I agree with the idea that axis labels must be strings. Yes, this is the opposite of my position on tick labels ("names"), but there's a reason: ticks are often defined by whatever data you happen to be working with, but axis labels will in the vast majority of situations be defined by the programmer as they're writing the code. If the programmer wants to name something, they'll certainly be able to do so with a string.
-- Rob On Wed, Jul 21, 2010 at 2:08 PM, Keith Goodman <kwgood...@gmail.com> wrote: > On Wed, Jul 21, 2010 at 10:58 AM, M Trumpis <mtrum...@berkeley.edu> wrote: > >> Separately, regarding the permissible axis labels, I think we must not >> allow any enumerated axis labels (ie, ints and floats). I don't >> remember if there was a consensus about that yesterday. We don't have >> the flexibility in the ndarray API to allow for the expression >> darr.method(axis=2) to mean not the 2nd dimension, but the Axis with >> label==2 > > So the axis label rule could be either: > > 1. str only > 2. Any hashable object except int or float > > #1 is looking better and better. Plus you already coded it :) > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion > _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion