Author: mattip <[email protected]>
Branch: ufuncapi
Changeset: r74762:de3415b4e9f4
Date: 2014-11-29 23:48 +0200
http://bitbucket.org/pypy/pypy/changeset/de3415b4e9f4/
Log: each call resets the steps, dims
diff --git a/pypy/module/micronumpy/ufuncs.py b/pypy/module/micronumpy/ufuncs.py
--- a/pypy/module/micronumpy/ufuncs.py
+++ b/pypy/module/micronumpy/ufuncs.py
@@ -1338,8 +1338,8 @@
raise oefmt(space.w_RuntimeError,
"set_dims_and_steps called inappropriately")
if self.dims_steps_set:
- raise oefmt(space.w_RuntimeError,
- "set_dims_and_steps called inappropriately")
+ free_raw_storage(self.dims, track_allocation=False)
+ free_raw_storage(self.steps, track_allocation=False)
self.dims = alloc_raw_storage(LONG_SIZE * len(dims),
track_allocation=False)
self.steps = alloc_raw_storage(LONG_SIZE * len(steps),
track_allocation=False)
for i in range(len(dims)):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit