[pypy-commit] pypy default: cleanup, make the prod test pass for numpypy and numpy ( -A )
mattip
noreply at buildbot.pypy.org
Thu Dec 19 20:03:52 CET 2013
Author: Matti Picus <matti.picus at gmail.com>
Branch:
Changeset: r68486:862f40eff396
Date: 2013-12-19 21:03 +0200
http://bitbucket.org/pypy/pypy/changeset/862f40eff396/
Log: cleanup, make the prod test pass for numpypy and numpy ( -A )
diff --git a/pypy/module/micronumpy/interp_dtype.py b/pypy/module/micronumpy/interp_dtype.py
--- a/pypy/module/micronumpy/interp_dtype.py
+++ b/pypy/module/micronumpy/interp_dtype.py
@@ -1,4 +1,3 @@
-import sys
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.error import OperationError, operationerrfmt
from pypy.interpreter.gateway import interp2app, unwrap_spec
diff --git a/pypy/module/micronumpy/test/test_numarray.py b/pypy/module/micronumpy/test/test_numarray.py
--- a/pypy/module/micronumpy/test/test_numarray.py
+++ b/pypy/module/micronumpy/test/test_numarray.py
@@ -1400,18 +1400,18 @@
assert (array([[1,2],[3,4]]).prod(1) == [2, 12]).all()
def test_prod(self):
- from numpypy import array, int_, dtype
+ from numpypy import array, dtype
a = array(range(1, 6))
assert a.prod() == 120.0
assert a[:4].prod() == 24.0
for dt in ['bool', 'int8', 'uint8', 'int16', 'uint16']:
a = array([True, False], dtype=dt)
assert a.prod() == 0
- assert a.prod().dtype is dtype('uint' if dt[0] == 'u' else 'int')
+ assert a.prod().dtype == dtype('uint' if dt[0] == 'u' else 'int')
for dt in ['l', 'L', 'q', 'Q', 'e', 'f', 'd', 'F', 'D']:
a = array([True, False], dtype=dt)
assert a.prod() == 0
- assert a.prod().dtype is dtype(dt)
+ assert a.prod().dtype == dtype(dt)
def test_max(self):
from numpypy import array, zeros
More information about the pypy-commit
mailing list