Author: Romain Guillebert <[email protected]>
Branch:
Changeset: r66360:53b319fef3b0
Date: 2013-08-27 15:38 +0100
http://bitbucket.org/pypy/pypy/changeset/53b319fef3b0/
Log: Add two failing tests
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
@@ -1928,6 +1928,22 @@
a.fill(12)
assert (a == '1').all()
+ def test_boolean_indexing(self):
+ import numpypy as np
+ a = np.zeros((1, 3))
+ b = np.array([True])
+
+ assert (a[b] == a).all()
+
+ a[b] = 1.
+
+ assert (a == [[1., 1., 1.]]).all()
+
+ def test_boolean_array(self):
+ import numpypy as np
+ a = np.ndarray([1], dtype=bool)
+ assert a[0] == True
+
class AppTestMultiDim(BaseNumpyAppTest):
def test_init(self):
import numpypy
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit