Reverse parameter in ordering functions

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Reverse parameter in ordering functions

mpro
Hi all,

I created pull request #14989, which adds reverse parameter in np.sort
function.

As suggested in the comments, I want to ask for some feedback on adding
parameter 'reverse' . Not only in sort, but in ordering functions in
general.

Magdalena



--
Sent from: http://numpy-discussion.10968.n7.nabble.com/
_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Reverse parameter in ordering functions

Sebastian Berg
On Wed, 2019-11-27 at 10:00 -0700, mpro wrote:

> Hi all,
>
> I created pull request #14989, which adds reverse parameter in
> np.sort
> function.
>
> As suggested in the comments, I want to ask for some feedback on
> adding
> parameter 'reverse' . Not only in sort, but in ordering functions in
> general.
>
Since the standard python functions all have the `reverse` parameter,
it seems like a good idea to me.

I agree that when we add it, it probably would be good to aim for
adding it for all sorting related functions at the same time.

Best,

Sebastian



> Magdalena
>
>
>
> --
> Sent from: http://numpy-discussion.10968.n7.nabble.com/
> _______________________________________________
> NumPy-Discussion mailing list
> [hidden email]
> https://mail.python.org/mailman/listinfo/numpy-discussion
>

_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Reverse parameter in ordering functions

mpro
I added 'reverse' in all ordering functions. The question is whether it's
better to add reverse to all C ordering methods or to make changes on Python
level.



--
Sent from: http://numpy-discussion.10968.n7.nabble.com/
_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion