Author: Romain Guillebert <[email protected]>
Branch: numpypy-nditer
Changeset: r64875:5a7505174934
Date: 2013-06-13 20:22 +0200
http://bitbucket.org/pypy/pypy/changeset/5a7505174934/
Log: Add a test for nditers with mixed order
diff --git a/pypy/module/micronumpy/test/test_nditer.py
b/pypy/module/micronumpy/test/test_nditer.py
--- a/pypy/module/micronumpy/test/test_nditer.py
+++ b/pypy/module/micronumpy/test/test_nditer.py
@@ -84,6 +84,17 @@
r.append((value, it.index))
assert r == [(0, 0), (1, 2), (2, 4), (3, 1), (4, 3), (5, 5)]
+ @py.test.mark.xfail(reason="Fortran order not implemented")
+ def test_iters_with_different_order(self):
+ from numpypy import nditer, array
+
+ a = array([[1, 2], [3, 4]], order="C")
+ b = array([[1, 2], [3, 4]], order="F")
+
+ it = nditer([a, b])
+
+ assert list(it) == zip(range(1, 5), range(1, 5))
+
def test_interface(self):
from numpypy import arange, nditer, zeros
a = arange(6).reshape(2,3)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit