[pypy-commit] pypy use_min_scalar: Start branch to correctly resolve the output dtype of ufunc(array, scalar) calls.

rlamy noreply at buildbot.pypy.org
Sat May 30 21:11:12 CEST 2015


Author: Ronan Lamy <ronan.lamy at gmail.com>
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


More information about the pypy-commit mailing list