Author: mattip <[email protected]>
Branch:
Changeset: r79862:399217ef3933
Date: 2015-09-27 02:38 +0300
http://bitbucket.org/pypy/pypy/changeset/399217ef3933/
Log: do not chain ndarray.base; ensure ndarray.base.base is None
diff --git a/pypy/module/micronumpy/concrete.py
b/pypy/module/micronumpy/concrete.py
--- a/pypy/module/micronumpy/concrete.py
+++ b/pypy/module/micronumpy/concrete.py
@@ -557,6 +557,11 @@
self.size = ovfcheck(support.product_check(shape) *
self.dtype.elsize)
except OverflowError:
raise oefmt(dtype.itemtype.space.w_ValueError, "array is too big.")
+ while orig_arr is not None:
+ assert isinstance(orig_arr, W_NDimArray)
+ if orig_arr.implementation.base() is None:
+ break
+ orig_arr = orig_arr.implementation.base()
self.start = start
self.orig_arr = orig_arr
flags = parent.flags & NPY.ARRAY_ALIGNED
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit