[pypy-commit] pypy default: fix array2string for possibly missing long double types
bdkearns
noreply at buildbot.pypy.org
Sun Feb 24 09:18:26 CET 2013
Author: Brian Kearns <bdkearns at gmail.com>
Branch:
Changeset: r61723:7fe38a515d08
Date: 2013-02-24 03:17 -0500
http://bitbucket.org/pypy/pypy/changeset/7fe38a515d08/
Log: fix array2string for possibly missing long double types
diff --git a/lib_pypy/numpypy/core/arrayprint.py b/lib_pypy/numpypy/core/arrayprint.py
--- a/lib_pypy/numpypy/core/arrayprint.py
+++ b/lib_pypy/numpypy/core/arrayprint.py
@@ -294,12 +294,12 @@
#else:
format_function = formatdict['int']
elif issubclass(dtypeobj, _nt.floating):
- if issubclass(dtypeobj, _nt.longfloat):
+ if hasattr(_nt, 'longfloat') and issubclass(dtypeobj, _nt.longfloat):
format_function = formatdict['longfloat']
else:
format_function = formatdict['float']
elif issubclass(dtypeobj, _nt.complexfloating):
- if issubclass(dtypeobj, _nt.clongfloat):
+ if hasattr(_nt, 'clongfloat') and issubclass(dtypeobj, _nt.clongfloat):
format_function = formatdict['longcomplexfloat']
else:
format_function = formatdict['complexfloat']
More information about the pypy-commit
mailing list