Skip to content

Commit 143c16c

Browse files
committed
BF: catch case where longdouble is float64
Still trying to fix the POWER7 failure.
1 parent ea3a400 commit 143c16c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

nibabel/casting.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ def type_info(np_type):
254254
# double pair on PPC. The _check_nmant routine does not work for this
255255
# type, hence the processor check
256256
ret.update(dict(nmant = 106, width=width))
257+
elif (_check_nmant(np.longdouble, 52) and
258+
_check_maxexp(np.longdouble, 11)):
259+
# Got float64 despite everything
260+
pass
257261
elif (_check_nmant(np.longdouble, 112) and
258262
_check_maxexp(np.longdouble, 16384)):
259263
# binary 128, but with some busted type information. np.longcomplex
@@ -272,7 +276,8 @@ def type_info(np_type):
272276
maxexp = 16384,
273277
width = width)
274278
else: # don't recognize the type
275-
raise FloatingError('We had not expected type %s' % np_type)
279+
raise FloatingError('We had not expected long double type %s '
280+
'with info %s' % (np_type, info))
276281
return ret
277282

278283

0 commit comments

Comments
 (0)