[Numpy-discussion] take behaviour has changed

Travis Oliphant oliphant.travis at ieee.org
Fri Sep 22 12:13:42 CDT 2006

Christian Kristukat wrote:
> Bill Baxter <wbaxter <at> gmail.com> writes:
>> Yep, check the release notes:
>> http://www.scipy.org/ReleaseNotes/NumPy_1.0
>> search for 'take' on that page to find out what others have changed as well.
>> --bb
> Ok. Does axis=None then mean, that take(a, ind) operates on the flattened array?
> This it at least what it seem to be. I noticed that the ufunc behaves
> differently. a.take(ind) and a.take(ind, axis=0) behave the same, so the default
> argument to axis is 0 rather than None.

What do you mean.  There is no "ufunc" take.  There is a function take 
that just calls the method.  The default arguments for all functions 
that match methods are the same as the methods (which means axis=None).  
However, in oldnumeric (which pylab imports by the way),  the default 
axes are the same as they were in Numeric. 

Also, if you have a 1-d array, then the axis argument doesn't make any 
difference.   Please clarify what you are saying to be sure we don't 
have a bug floating around.


More information about the Numpy-discussion mailing list