[Numpy-discussion] Ransom Proposals

Travis Oliphant oliphant at ee.byu.edu
Mon Mar 27 10:46:01 CST 2006


Tim Hochberg wrote:

>>
>>
>> The transpose function handles a list and returns an array.  
>
>
> Yes. And this is exactly the same property that I've been ranting 
> about incessantly for the past several days in the case of reshape. It 
> seems convenient, but it's evil. It leads to intermittent, hard to 
> find bugs, since when passed a list it necessarily creates a new array 
> object, but when passed an array, it returns a view.
>

And this is also the area where Tim is going to find people that 
disagree.  The functional interfaces have always been there so that 
other objects could be manipulated as arrays.    There is *a lot* of 
precendent behind the functional interfaces.  It seems like a big change 
to simply get rid of them .

Yes, having this ability means that you have to think about it a bit if 
you are going to use the functional interface and try to do in-place 
operations.  But, I would argue that this is an "advanced" usage which 
is implemented to save space and time.  I fully support such "advanced" 
usages, but believe the person using them should know what they are 
doing.  Understanding why the functional interface may return a copy 
does not seem to me to be a big deal for somebody thinking about 
"in-place" operations.

I'm -1 right now on removing (or even deprecating) the functional 
interfaces.   I'm +1 on educating users on the advantages of using 
methods and that the functional interfaces are just basic wrappers 
around them.

-Travis





More information about the Numpy-discussion mailing list