larry-discuss team mailing list archive
-
larry-discuss team
-
Mailing list archive
-
Message #00097
Re: A new proposal for indexing with labels
On Mon, Feb 8, 2010 at 6:42 AM, Keith Goodman <kwgoodman@xxxxxxxxx> wrote:
> On Mon, Feb 8, 2010 at 6:39 AM, Keith Goodman <kwgoodman@xxxxxxxxx> wrote:
>> My goal is for larry and arrays to behave the same way
>> where feasible. But I could borrow an ideas from the first blueprint:
>>
>> lar.lix[index]
>>
>> where index would only contain labels. Inside the lix method I would
index would only contain labels and slices. I forgot the slice part.
>> convert the labels to indices and then return lar[index_converted]. It
>> would have the advantage of not slowing down an already slow
>> larry.__getitem__. And the user would not have to wrap labels in a
>> class. One downside is that you cannot do
>>
>> lar['price']['aapl'][date]
>>
>> instead it would be
>>
>> lar.lix['price'].lix['appl'].lix['date']
>>
>> Or
>>
>> lar['price', 'aapl', date]
>
> Oh, and I forgot one of the main point, lix would use rectangular
> indexing. So it would convert multiple lists to rectangular indexing
> before passing index_converted to larry.__getitem__.
>
References
-
A new proposal for indexing with labels
From: Keith Goodman, 2010-02-07
-
Re: A new proposal for indexing with labels
From: Keith Goodman, 2010-02-08
-
Re: A new proposal for indexing with labels
From: josef . pktd, 2010-02-08
-
Re: A new proposal for indexing with labels
From: josef . pktd, 2010-02-08
-
Re: A new proposal for indexing with labels
From: josef . pktd, 2010-02-08
-
Re: A new proposal for indexing with labels
From: josef . pktd, 2010-02-08
-
Re: A new proposal for indexing with labels
From: Keith Goodman, 2010-02-08
-
Re: A new proposal for indexing with labels
From: josef . pktd, 2010-02-08
-
Re: A new proposal for indexing with labels
From: Keith Goodman, 2010-02-08
-
Re: A new proposal for indexing with labels
From: Keith Goodman, 2010-02-08