Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Division by 0 #884

Closed
EmmaRenauld opened this issue Jan 23, 2024 · 1 comment · Fixed by #1089
Closed

Division by 0 #884

EmmaRenauld opened this issue Jan 23, 2024 · 1 comment · Fixed by #1089
Assignees

Comments

@EmmaRenauld
Copy link
Contributor

In the pytest of scil_dti_metrics:

RuntimeWarning: divide by zero encountered in log
D[..., 6] = -np.log(b0)

This originates from dipy/reconst/dti.py:2120, which is in method lower_triangular, which is called through our own line 215: tenfit = tenmodel.fit(data, mask)

@AntoineTheb
Copy link
Contributor

AntoineTheb commented Dec 12, 2024

Fun fact: debugging warnings can be made easier by making pytest crash on warnings, which makes the interpreter show the full traceback https://stackoverflow.com/a/59383021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants