diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2014-09-03 13:58:44 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2014-09-03 13:58:44 -0600 |
commit | 03dcd3b754d9a618c0c2c8c72bb225565758bbf5 (patch) | |
tree | 8be26784c27e2aabfd4c5a0458f686c650f6d376 /numpy/f2py | |
parent | 6968c25fa35be43504eb314ac58fc7f64480facc (diff) | |
parent | eb9db82800f10ddc87e0f5efb6bb9be3fa8a5518 (diff) | |
download | numpy-03dcd3b754d9a618c0c2c8c72bb225565758bbf5.tar.gz |
Merge pull request #5038 from juliantaylor/clongdouble-align
TST: skip clongdouble alignment checks on 32 bit arches
Diffstat (limited to 'numpy/f2py')
-rw-r--r-- | numpy/f2py/tests/test_array_from_pyobj.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/numpy/f2py/tests/test_array_from_pyobj.py b/numpy/f2py/tests/test_array_from_pyobj.py index 2dcb9e834..c51fa3936 100644 --- a/numpy/f2py/tests/test_array_from_pyobj.py +++ b/numpy/f2py/tests/test_array_from_pyobj.py @@ -9,7 +9,8 @@ import platform import nose from numpy.testing import * -from numpy import array, alltrue, ndarray, asarray, can_cast, zeros, dtype +from numpy import (array, alltrue, ndarray, asarray, can_cast, zeros, dtype, + intp, clongdouble) from numpy.core.multiarray import typeinfo import util @@ -107,11 +108,12 @@ _cast_dict['DOUBLE'] = _cast_dict['INT'] + ['UINT', 'FLOAT', 'DOUBLE'] _cast_dict['CFLOAT'] = _cast_dict['FLOAT'] + ['CFLOAT'] -# (debian) sparc system malloc does not provide the alignment required by +# 32 bit system malloc typically does not provide the alignment required by # 16 byte long double types this means the inout intent cannot be satisfied and # several tests fail as the alignment flag can be randomly true or fals # when numpy gains an aligned allocator the tests could be enabled again -if 'sparc' not in platform.platform().lower() and sys.platform != 'win32': +if ((intp().dtype.itemsize != 4 or clongdouble().dtype.alignment <= 8) and + sys.platform != 'win32'): _type_names.extend(['LONGDOUBLE', 'CDOUBLE', 'CLONGDOUBLE']) _cast_dict['LONGDOUBLE'] = _cast_dict['LONG'] + \ ['ULONG', 'FLOAT', 'DOUBLE', 'LONGDOUBLE'] |