[Numpy-discussion] sort documentation

dmitrey dmitrey.kroshko at scipy.org
Sun Aug 31 12:33:00 EDT 2008


As for me I can't understand the general rule: when numpy funcs return 
copy and when reference?

For example why x.fill() returns None (do inplace modification) while 
x.ravel(), x.flatten() returns copy? Why the latters don't do inplace 
modification, as should be expected?

D.

Alan G Isaac 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.
>
> Cheers,
> Alan Isaac
>
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
>
>
>   




More information about the NumPy-Discussion mailing list