Skip to content

Commit c2531c3

Browse files
committed
BF: disable use of longdouble on sparc
The sparc buildbots were failing because the tests were too slow; float128 must be extremely slow.
1 parent ac9c3ec commit c2531c3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nibabel/casting.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
casting. Others work round numpy casting to and from python ints
55
"""
66

7-
from platform import processor
7+
from platform import processor, machine
88

99
import numpy as np
1010

@@ -542,7 +542,8 @@ def best_float():
542542
best_type : numpy type
543543
floating point type with highest precision
544544
"""
545-
if type_info(np.longdouble)['nmant'] > type_info(np.float64)['nmant']:
545+
if (type_info(np.longdouble)['nmant'] > type_info(np.float64)['nmant'] and
546+
machine() != 'sparc64'): # sparc has crazy-slow float128
546547
return np.longdouble
547548
return np.float64
548549

0 commit comments

Comments
 (0)