[Numpy-discussion] 1D array sorting ascending and descending by fields
Tue Jun 5 09:26:37 CDT 2012
On Mon, Jun 4, 2012 at 6:08 PM, Chris Barker <firstname.lastname@example.org> 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 <email@example.com> 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