[Numpy-discussion] Ransom Proposals

Sasha ndarray at mac.com
Sat Mar 25 17:45:05 CST 2006


On 3/25/06, Tim Hochberg <tim.hochberg at cox.net> wrote:
> ...
> However, if reshape does not return a view, let's say obj is a list, it
> will fail. And not *just* fail, it will fail silently. There are obvious
> ways to fix this program (set obj.shape instead of using reshape, for
> example), but the fewer perils I need to remember the better.

Or, you can use the reshape method instead of function.  I believe
numpy advocates use of methods instead of functions.  What you observe
is just another reason for that.  Since functions like reshape remain
in numpy primarily for backwards compatibility, I would be against any
change in semantics.




More information about the Numpy-discussion mailing list