[Numpy-discussion] BOF notes: Fernando's proposal: NumPy ndarray with named axes

Joshua Holbrook josh.holbrook@gmail....
Thu Jul 8 16:36:05 CDT 2010


On Thu, Jul 8, 2010 at 1:30 PM, Lluís <xscript@gmx.net> wrote:
> Joshua Holbrook writes:
>>> arr[not int] -> tick-based indexing
>
>> At the BoF, we chose to drop this because we wanted to allow integer ticks (or
>> implicit type conversion, either way) without the ambiguity of, "did we mean
>> that in the ndarray sense or in a "tick with the name '1'" sense?
>
> Sorry, I didn't get the part about implicit type conversion. Did you mean
> objects implementing the '__int__' method?
>
> Still, I have a question. Did you also agree that this should forcibly index
> through ticks?
>
>  arr.something[int]      -> tick-based indexing
>
> Or is it viable to use
>
>  arr.something[str(int)] -> tick-based indexing
>  arr.something[int]      -> normal indexing
>
> You probably discussed about the pros and cons of this, which is always easier
> and more productive when face-to-face, so I'd jus tlike to know if something was
> agreed on this.
>
> Thanks a lot, and sorry for my flooding of emails. It's just that I've already
> been working on much of this, and I've already developed for some time a set of
> ideas on how the syntax should be :)
>
> Lluis
>
> --
>  "And it's much the same thing with knowledge, for whenever you learn
>  something new, the whole world becomes that much richer."
>  -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
>  Tollbooth
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>

Lluis:
> Sorry, I didn't get the part about implicit type conversion. Did you mean
> objects implementing the '__int__' method?

I mean the idea that you can pass integers as arguments for ticks, but
have integers be converted to strings due to all the ticks actually
being strings in the background.

> Still, I have a question. Did you also agree that this should forcibly index
> through ticks?
>
>  arr.something[int]      -> tick-based indexing
>

Yes.

--Josh


More information about the NumPy-Discussion mailing list