diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-08-11 14:34:25 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-08-11 14:34:25 -0600 |
commit | d10832b74952ae6d5a27a4f1b03f6097e347d632 (patch) | |
tree | 09c9d3ba7593eb65ffbdbc565bff484f492349b2 | |
parent | c6da120806f70d417619e1a34512f38dbd0dcc8d (diff) | |
download | numpy-d10832b74952ae6d5a27a4f1b03f6097e347d632.tar.gz |
BUG: Fix test_operand_flags test.
The test tests an inner loop in operand_flag_tests.c.src that expects
a long type, but it is tested using 'i8'. This fails when long is not
'i8'.
Closes #3363.
-rw-r--r-- | numpy/core/tests/test_ufunc.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/numpy/core/tests/test_ufunc.py b/numpy/core/tests/test_ufunc.py index e4698abc6..eadb767ed 100644 --- a/numpy/core/tests/test_ufunc.py +++ b/numpy/core/tests/test_ufunc.py @@ -16,7 +16,8 @@ class TestUfunc(TestCase): def test_pickle_withstring(self): import pickle - astring = asbytes("cnumpy.core\n_ufunc_reconstruct\np0\n(S'numpy.core.umath'\np1\nS'cos'\np2\ntp3\nRp4\n.") + astring = asbytes("cnumpy.core\n_ufunc_reconstruct\np0\n" + "(S'numpy.core.umath'\np1\nS'cos'\np2\ntp3\nRp4\n.") assert pickle.loads(astring) is np.cos def test_reduceat_shifting_sum(self) : @@ -802,11 +803,11 @@ class TestUfunc(TestCase): assert_raises(TypeError, test_add, a, b) def test_operand_flags(self): - a = np.arange(16, dtype='i8').reshape(4,4) - b = np.arange(9, dtype='i8').reshape(3,3) + a = np.arange(16, dtype='l').reshape(4,4) + b = np.arange(9, dtype='l').reshape(3,3) opflag_tests.inplace_add(a[:-1,:-1], b) assert_equal(a, np.array([[0,2,4,3],[7,9,11,7], - [14,16,18,11],[12,13,14,15]], dtype='i8')) + [14,16,18,11],[12,13,14,15]], dtype='l')) a = np.array(0) opflag_tests.inplace_add(a, 3) |