[Numpy-discussion] sort documentation
Pauli Virtanen
pav@iki...
Sun Aug 31 12:37:31 CDT 2008
Sun, 31 Aug 2008 10:27:59 -0700, Robert Kern wrote:
> On Sun, Aug 31, 2008 at 09:26, Alan G Isaac <aisaac@american.edu> wrote:
>> I find this confusing:
>>
>> numpy.sort(a, axis=-1, kind='quicksort', order=None)
>>
>> Return copy of 'a' sorted along the given axis.
>>
>> Perform an inplace sort along the given axis using the algorithm
>> specified by the kind keyword.
>>
>> I suppose the last bit is supposed to refer to the ``sort`` method
>> rather than the function, but I do not see any signal that this is the
>> case.
>
> The docstring is much more complete and correct in SVN.
Even more complete and correct docstring is here:
http://sd-2116.dedibox.fr/pydocweb/doc/numpy.sort/
[clip]
> >>> a=np.array([[1,4],[3,1]])
> >>> a.sort(1)
> >>> a
> array([[1, 4],
> [1, 3]])
> >>> a.sort(0)
> >>> a
> array([[1, 3],
> [1, 4]])
These examples were fixed a couple of weeks ago in the editor.
--
Pauli Virtanen
More information about the Numpy-discussion
mailing list