On Tue, Jul 11, 2006 at 12:37:23PM +0200, Pau Gargallo wrote:
> > Something's not quite right here.  The argsort docstring states that:
> >
> >     argsort(a,axis=-1) return the indices into a of the sorted array
> >     along the given axis, so that take(a,result,axis) is the sorted array.
> >
> > But
> >
> > N.take(A,A.argsort()) breaks.  Either this is a bug, or the docstring
> > needs to be updated.
> >
> > Cheers
> > Stéfan
> >
> 
> I think the docstring is wrong, because take doesn't do that.
> if you N.take(A,A.argsort(1), 1), it doesn't break but it doesn't sort
> A neither.
> 
> Take seems to peek entire columns, but take's docstring is missing.
> 
> For the argsort docstring, it may be usefull to indicate that if one do
> >>> ind = indices(A.shape)
> >>> ind[ax] = A.argsort(axis=ax)
> then A[ind] is the sorted array.

We can always adapt the documentation at

http://numeric.scipy.org/numpydoc/numpy-9.html#pgfId-36425

into a docstring.  I'll file a ticket.

Cheers
Stéfan


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to