8000 TST: skip clongdouble alignment checks on 32 bit arches for 1.9 by juliantaylor · Pull Request #5040 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

TST: skip clongdouble alignment checks on 32 bit arches for 1.9 #5040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 3, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
TST: skip clongdouble alignment checks on 32 bit arches
turns out not only sparc is borked, skip the checks on all 32 bit arches
with too large clongdouble alignments until we have an aligned
allocator.
  • Loading branch information
juliantaylor committed Sep 3, 2014
commit b95c7df3b2da1552a895b6238456f72467a8d2bd
6 changes: 3 additions & 3 deletions numpy/core/tests/test_numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,9 +1049,9 @@ def test_array_equiv(self):

def assert_array_strict_equal(x, y):
assert_array_equal(x, y)
# Check flags, debian sparc and win32 don't provide 16 byte alignment
if (x.dtype.alignment > 8 and
'sparc' not in platform.platform().lower() and
# Check flags, 32 bit arches typically don't provide 16 byte alignment
if ((x.dtype.alignment <= 8 or
np.intp().dtype.itemsize != 4) and
sys.platform != 'win32'):
assert_(x.flags == y.flags)
else:
Expand Down
8 changes: 5 additions & 3 deletions numpy/f2py/tests/test_array_from_pyobj.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
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
Expand Down Expand Up @@ -107,11 +108,12 @@ def is_intent_exact(self,*names):

_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']
Expand Down
3857
0