Skip to content

Commit

Permalink
Merge pull request numpy#3599 from charris/fix-operand-flags-test
Browse files Browse the repository at this point in the history
BUG: Fix test_operand_flags test.
  • Loading branch information
charris committed Aug 11, 2013
2 parents 43a6c3d + d10832b commit 0a16937
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions numpy/core/tests/test_ufunc.py
Expand Up @@ -16,7 +16,8 @@ def test_pickle(self):

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) :
Expand Down Expand Up @@ -802,11 +803,11 @@ def test_ufunc_custom_out(self):
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)
Expand Down

0 comments on commit 0a16937

Please sign in to comment.