Skip to content

Commit 0398e8e

Browse files
committed
BF: work around very odd POWER7 failure
There was a very odd array comparison failure on POWER7, discussed here: http://mail.scipy.org/pipermail/nipy-devel/2012-June/007947.html
1 parent 3b71c4f commit 0398e8e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

nibabel/tests/test_arraywriters.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,11 @@ def test_arraywriters():
8787
# Byteswapped is OK
8888
bs_arr = arr.byteswap().newbyteorder('S')
8989
bs_aw = klass(bs_arr)
90-
assert_array_equal(bs_arr, round_trip(bs_aw))
90+
# assert against original array because POWER7 was running into
91+
# trouble using the byteswapped array (bs_arr)
92+
assert_array_equal(arr, round_trip(bs_aw))
9193
bs_aw2 = klass(bs_arr, arr.dtype)
92-
assert_array_equal(bs_arr, round_trip(bs_aw2))
94+
assert_array_equal(arr, round_trip(bs_aw2))
9395
# 2D array
9496
arr2 = np.reshape(arr, (2, 5))
9597
a2w = klass(arr2)

0 commit comments

Comments
 (0)