[pypy-commit] pypy object-dtype2: add test, fix bool
mattip
noreply at buildbot.pypy.org
Sun Apr 19 22:31:45 CEST 2015
Author: mattip <matti.picus at gmail.com>
Branch: object-dtype2
Changeset: r76836:f86e55aeb94a
Date: 2015-04-19 18:48 +0300
http://bitbucket.org/pypy/pypy/changeset/f86e55aeb94a/
Log: add test, fix bool
diff --git a/pypy/module/micronumpy/test/test_object_arrays.py b/pypy/module/micronumpy/test/test_object_arrays.py
--- a/pypy/module/micronumpy/test/test_object_arrays.py
+++ b/pypy/module/micronumpy/test/test_object_arrays.py
@@ -35,6 +35,8 @@
assert b == complex(1, -1)
b = np.array(complex(1, -1)) and a
assert (b == a).all()
+ c = np.array([1, 2, 3])
+ assert (a[0] != c[0])
def test_logical_ufunc(self):
import numpy as np
diff --git a/pypy/module/micronumpy/types.py b/pypy/module/micronumpy/types.py
--- a/pypy/module/micronumpy/types.py
+++ b/pypy/module/micronumpy/types.py
@@ -1746,6 +1746,7 @@
return v1
return v2
+ @raw_unary_op
def bool(self,v):
return self._obool(v)
More information about the pypy-commit
mailing list