[Numpy-discussion] reshape and ravel methods of arrays now return views or raise error

Travis Oliphant oliphant.travis at ieee.org
Wed Mar 29 10:11:07 EST 2006


Tim Hochberg wrote:
>
> Hi Travis,
>
> Ouch!
>
> In a sense, the problems that Zachary is  having illustrates both of 
> our points perfectly: he's now put in a position of going through a 
> bunch of needless pain. On the other hand, the implicit copying has 
> resulted in a bunch of code that does a bunch of uneeded copies, 
> probably without the original author knowing it, resulting in both 
> speed an memory inefficiency.
Yeah.  I really see your point.  I'm just uncomfortable breaking 
people's code too much.  A sub-class is a good idea.   It's a good place 
to experiment with new ideas.  It's one of the reasons we wanted the 
array to be sub-classable. 

Making a sub-class a super-class is also possible once it's working.

Best,

-Travis







More information about the NumPy-Discussion mailing list