Skip to content

Commit

Permalink
Merge pull request dipy#3230 from jhlegarreta/FixLoopVariableBinding
Browse files Browse the repository at this point in the history
STYLE: Fix function definition loop variable binding warning
  • Loading branch information
skoudoro authored May 19, 2024
2 parents 73ee32f + 30b86d8 commit 2aad9c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dipy/reconst/csdeconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ def forward_sdt_deconv_mat(ratio, l_values, r2_term=False):
for j in np.arange(0, n_orders * 2, 2):
if r2_term:
sharp = quad(
lambda z: lpn(j, z)[0][-1]
lambda z, j=j: lpn(j, z)[0][-1]
* gamma(1.5)
* np.sqrt(ratio / (4 * np.pi**3))
/ np.power((1 - (1 - ratio) * z**2), 1.5),
Expand All @@ -537,7 +537,8 @@ def forward_sdt_deconv_mat(ratio, l_values, r2_term=False):
)
else:
sharp = quad(
lambda z: lpn(j, z)[0][-1] * np.sqrt(1 / (1 - (1 - ratio) * z * z)),
lambda z, j=j: lpn(j, z)[0][-1]
* np.sqrt(1 / (1 - (1 - ratio) * z * z)),
-1.0,
1.0,
)
Expand Down

0 comments on commit 2aad9c6

Please sign in to comment.