[Numpy-discussion] Datarray BoF, part2

Keith Goodman kwgoodman@gmail....
Wed Jul 21 12:08:06 CDT 2010


On Wed, Jul 21, 2010 at 9:56 AM, John Salvatier
<jsalvati@u.washington.edu> wrote:
> I don't really know much about this topic, but what about a flag at array
> creation time (or whenever you define labels) that says whether valid
> indexes will be treated as labels or indexes for that array?

It's an interesting idea. My guess is that you'd end up having to
check the attribute all the time when writing code:

if dar.intaslabel:
    dar2 = dar[tickmap(i)]
else:
    dar2 = dar[i]


More information about the NumPy-Discussion mailing list