[Numpy-discussion] 1D array sorting ascending and descending by fields

Patrick Redmond plredmond at gmail.com
Tue Jun 5 10:26:37 EDT 2012

On Mon, Jun 4, 2012 at 6:08 PM, Chris Barker <chris.barker at noaa.gov> wrote:
> could you multiply the numeric field by -1, sort, then put it back
Yeah, that works great for my situation. Thanks Chris!

On Mon, Jun 4, 2012 at 8:17 PM, Benjamin Root <ben.root at ou.edu> wrote:
> While that may work for this users case, that would not work for all dtypes.
> Some, such as timedelta, datetime and strings would not be able to be
> multiplied by a number.
This is the reason why I thought there might be such a feature.

> Would be an interesting feature to add, but I am not certain if the negative
> sign notation would be best. Is it possible for a named field to start with
> a negative sign?
I'm not sure about what is allowable in names, but I would be
interested in getting involved with the NumPy project by helping to
add this feature. I'll check out the contributing doc.

More information about the NumPy-Discussion mailing list