Skip to content

Commit c93a142

Browse files
committed
ENH - use %e instead of %f to report non-positive w2
otherwise it would just print non-informative 0 for small numbers above threshold
1 parent 9218ed7 commit c93a142

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/quaternions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def fillpositive(xyz, w2_thresh=None):
9696
w2 = 1.0 - np.dot(xyz, xyz)
9797
if w2 < 0:
9898
if w2 < w2_thresh:
99-
raise ValueError('w2 should be positive, but is %f' % w2)
99+
raise ValueError('w2 should be positive, but is %e' % w2)
100100
w = 0
101101
else:
102102
w = np.sqrt(w2)

0 commit comments

Comments
 (0)