Author: Ronan Lamy <[email protected]>
Branch: use_min_scalar
Changeset: r77711:dc0b189ad663
Date: 2015-05-30 20:09 +0100
http://bitbucket.org/pypy/pypy/changeset/dc0b189ad663/
Log: Start branch to correctly resolve the output dtype of ufunc(array,
scalar) calls. Add tests for the expected behaviour.
diff --git a/pypy/module/micronumpy/test/test_ufuncs.py
b/pypy/module/micronumpy/test/test_ufuncs.py
--- a/pypy/module/micronumpy/test/test_ufuncs.py
+++ b/pypy/module/micronumpy/test/test_ufuncs.py
@@ -1349,3 +1349,5 @@
assert np.add(np.float16(0), np.longdouble(0)).dtype == np.longdouble
assert np.add(np.float16(0), np.complex64(0)).dtype == np.complex64
assert np.add(np.float16(0), np.complex128(0)).dtype == np.complex128
+ assert np.add(np.zeros(5, dtype=np.int8), 257).dtype == np.int16
+ assert np.subtract(np.zeros(5, dtype=np.int8), 257).dtype == np.int16
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit