Author: Matti Picus <[email protected]>
Branch: numpypy-segfault
Changeset: r65153:f669a32fe79d
Date: 2013-06-30 22:56 +0300
http://bitbucket.org/pypy/pypy/changeset/f669a32fe79d/
Log: a test that segfaults
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
@@ -293,6 +293,17 @@
b = array(a, copy=False, ndmin=4)
b[0,0,0,0] = 0
assert a[0, 0] == 0
+ a = array([[[]]])
+ # Simulate tiling an empty array, really tests repeat, reshape
+ # b = tile(a, (3, 2, 5))
+ reps = (3, 4, 5)
+ c = array(a, copy=False, subok=True, ndmin=len(reps))
+ print '1',c,c.shape
+ d = c.reshape(3, 4, 0)
+ print '2',c,c.shape
+ e = d.repeat(3, 0)
+ print '3',c,c.shape,e.shape
+ assert e.shape == (9, 4, 0)
def test_type(self):
from numpypy import array
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit