[Numpy-discussion] BOF notes: Fernando's proposal: NumPy ndarray with named axes
Keith Goodman
kwgoodman@gmail....
Fri Jul 9 18:18:19 CDT 2010
On Fri, Jul 9, 2010 at 4:05 PM, Christopher Barker
<Chris.Barker@noaa.gov> wrote:
> So what would you get if you wanted:
>
> MyDataArray['jones':'wilson']
>
> or
>
> MyDataArray.names[slice('jones','wilson')]
>
> or whatever the syntax would be?
>
> If it was in alphabetical order, you'd be all set, but what it if
> wasn't? It would be pretty cool if you could get an alphabetical slice.
If it sorted the data automatically then you couldn't turn off the
sorting. Without automatic sorting the user gets to decide whether or
not to sort before indexing. A sort ticks along axis function would be
useful, sort of like
http://larry.sourceforge.net/reference.html#la.larry.sortaxis.
More information about the NumPy-Discussion
mailing list