[Numpy-discussion] BOF notes: Fernando's proposal: NumPy ndarray with named axes
Fri Jul 9 19:22:59 CDT 2010
On Fri, Jul 9, 2010 at 5:00 PM, Christopher Barker
> Keith Goodman wrote:
>> On Fri, Jul 9, 2010 at 4:05 PM, Christopher Barker
>> <Chris.Barker@noaa.gov> wrote:
>>> So what would you get if you wanted:
>>> 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
> sure -- but what would it mean to ask for a slice by name without
> sorting? If you want it in the order it happens to be in, you'd use
> numerical slicing (at least that's the use case I can imagine).
That is true. It would just save you from having to look up the index value.
Another handy method would take tick and axis as input and return the index:
>> 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
> Yup -- that's nice, and would take care of most issues.
> Christopher Barker, Ph.D.
> Emergency Response Division
> NOAA/NOS/OR&R (206) 526-6959 voice
> 7600 Sand Point Way NE (206) 526-6329 fax
> Seattle, WA 98115 (206) 526-6317 main reception
> NumPy-Discussion mailing list
More information about the NumPy-Discussion