2008/8/29 Charles R Harris <[EMAIL PROTECTED]>: >> I like that idea. A lot of numpy functions return a reference to the >> modified array when the output array (out) is specified. > > Google up the various discussions of python sort to see why Guido doesn't > like that sort of thing. We've had that discussion on this list also and > pretty much decided to follow python in these matters. Not that I really > agree with Guido here, but it's a small point and when in Rome...
At first, I also thought it might be more intuitive to return the output array, but then I realised that it would make it more difficult to realise that the operation is being performed in-place. Maybe it is good to remind programmers of what happens under the hood, so that they are not surprised later when their data is "corrupted". Stéfan _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
