[Numpy-discussion] Ransom Proposals

Charles R Harris charlesr.harris at gmail.com
Mon Mar 27 21:40:02 CST 2006


Tim,

>
> That being said I have a suggestion that *might* satisfy everyone. Set
> the WRITEABLE flag to false if reshape creates a new array:


I think this will cause problems as I myself usually want to modify the
contents after a reshape. Why not in this case have a.reshape(...) return a
view when possible and raise an error otherwise, and have the functional
form make a copy. Reshape the method then provides a path to efficient
computing, while reshape the function promotes safe computing. I like to
write classes in C++ where I can do things like
b.mul(c).add(d).div(e) all inplace for efficiency and the current situation
strikes me as similar.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20060327/918c08bc/attachment.html 


More information about the Numpy-discussion mailing list