We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac9c3ec commit c2531c3Copy full SHA for c2531c3
nibabel/casting.py
@@ -4,7 +4,7 @@
4
casting. Others work round numpy casting to and from python ints
5
"""
6
7
-from platform import processor
+from platform import processor, machine
8
9
import numpy as np
10
@@ -542,7 +542,8 @@ def best_float():
542
best_type : numpy type
543
floating point type with highest precision
544
545
- if type_info(np.longdouble)['nmant'] > type_info(np.float64)['nmant']:
+ if (type_info(np.longdouble)['nmant'] > type_info(np.float64)['nmant'] and
546
+ machine() != 'sparc64'): # sparc has crazy-slow float128
547
return np.longdouble
548
return np.float64
549
0 commit comments