Hi all,
This looks like a bug to me.
>>> a = arange(6).reshape(2,3)
>>> a.resize((3,3))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: cannot resize this array: it does not own its data
Is there any reason resize should fail in this case? Resize should be
returning an new array, no? There are several other things that
look like bugs in this method, for instance:
>>> a = arange(6).resize((2,3))
>>> a
`a` has no value and no error is raised.
The resize function works as expected
>>> resize(a,(3,3))
array([[0, 1, 2],
[3, 4, 5],
[0, 1, 2]])
Chuck
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion