Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
serge-sans-paille committed Jan 1, 2022
1 parent d305e4a commit 8b4f724
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pythran/tests/test_numpy_ufunc_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class TestNumpyUFuncBinary(TestEnv):
reduced_ufunc = {'add', 'minimum', 'maximum', 'multiply', 'bitwise_or',
'bitwise_and', 'bitwise_xor'}

cmp_ufunc = ('equal', 'greater_equal', 'less_equal', 'not_equal', 'greater',
'less')

for ns, f in binary_ufunc:
if 'bitwise_' in f or 'ldexp' in f or '_shift' in f :
setattr(TestNumpyUFuncBinary, 'test_' + f, eval("lambda self: self.run_test('def np_{0}(a): from {1} import {0} ; return {0}(a,a)', numpy.ones(10, numpy.int32), np_{0}=[NDArray[numpy.int32,:]])".format(f, ns)))
Expand Down Expand Up @@ -78,7 +81,7 @@ class TestNumpyUFuncBinary(TestEnv):
pass

## Tests for accumulation
if 'scipy' not in ns:
if 'scipy' not in ns and f not in cmp_ufunc:
setattr(TestNumpyUFuncBinary, 'test_accumulate_' + f, eval("lambda self: self.run_test('def np_{0}_accumulate(a): from {1} import {0} ; return {0}.accumulate(a)', numpy.ones(10), np_{0}_accumulate=[NDArray[float,:]])".format(f, ns)))
setattr(TestNumpyUFuncBinary, 'test_accumulate_' + f + '_matrix', eval("lambda self: self.run_test('def np_{0}_matrix_accumulate(a): from {1} import {0} ; return {0}.accumulate(a)', numpy.ones((2,5)) - 0.2 , np_{0}_matrix_accumulate=[NDArray[float, :, :]])".format(f, ns)))
## Tests for reduction
Expand Down

0 comments on commit 8b4f724

Please sign in to comment.