[Numpy-discussion] [ANN] New open source project for labeled arrays

Keith Goodman kwgoodman at gmail.com
Thu Jan 28 10:07:46 EST 2010


On Thu, Jan 28, 2010 at 6:53 AM, Bruce Southey <bsouthey at gmail.com> wrote:
> On Wed, Jan 27, 2010 at 9:24 PM, Keith Goodman <kwgoodman at gmail.com> wrote:
>> On Wed, Jan 27, 2010 at 7:13 PM, Pierre GM <pgmdevlist at gmail.com> wrote:
>>> On Jan 27, 2010, at 9:10 PM, Keith Goodman wrote:
>>>> I recently opened sourced one of my packages. It is a labeled array
>>>> that I call larry.
>>>>
>>>> A two-dimensional larry, for example, contains a 2d NumPy array with
>>>> labels on each row and column. A larry can have any dimension.
>>>>
>>>> Alignment by label is automatic when you add (or subtract, multiply,
>>>> divide) two larrys.
>>>>
>>>> larry has built-in methods such as movingsum, ranking, merge, shuffle,
>>>> zscore, demean, lag as well as typical NumPy methods like sum, max,
>>>> std, sign, clip. NaNs are treated as missing data.
>>>
>>> So you can't have an integer larry with missing data ?
>>
>> No.
>>
>
> (No means yes??? :-) )

No.

> So how do you distinguish between a real NaN and a missing value?
> (Having to check array before and after an operation is not fun.)
> This is one of the reasons why masked arrays are superior for missing values.

Unit test coverage of larry is pretty good, so at some point I could
begin porting, function by function, to ma while keeping NaN -->
missing. After the porting was complete I could remove NaN --> missing
and add the ability to pass in a mask or missing value marker.

I don't have any experience with ma. And I have a long todo list. So
ma support is not currently planned.



More information about the NumPy-Discussion mailing list