[SciPy-User] [ANN] la 0.2, the labeled array

josef.pktd@gmai... josef.pktd@gmai...
Thu Apr 29 12:09:51 CDT 2010


On Thu, Apr 29, 2010 at 3:37 AM, Sebastian Haase <seb.haase@gmail.com> wrote:
> Hi Keith,
>
> how would you say do larrys compare to numpy recarrays ? Can you
> convert one to the other ? - IOW why do put the labels in a separate
> list instead of the dtype ?

my impression:

the main difference is that
larrys have labels along all dimensions, e.g also for rows.

larrys data array has a single, homogenous dtype, not structured
dtypes, so standard array slicing and indexing applies along all axis,
mean, var,... is as usual with ndarrays

with recarrays you have to create a view first, assuming the column
dtypes are identical, otherwise it's a bit of a pain to get the mean
of all columns.

I'm not sure about larry.from_recarrays, larry.to_recarrays but if the
recarray has homogenous dtype it should be possible to use names and
views directly in the constructors.

Josef

Josef


>
> Regards,
> Sebastian Haase
>
>
> On Tue, Apr 27, 2010 at 11:05 PM, Keith Goodman <kwgoodman@gmail.com> wrote:
>> I am pleased to announce the second release of the la package, version 0.2.
>>
>> The main class of the la package is a labeled array, larry. A larry
>> consists of a data array and a label list. The data array is stored as
>> a NumPy array and the label list as a list of lists.
>>
>> 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.
>>
>> Alignment by label is automatic when you add (or subtract, multiply,
>> divide) two larrys.
>>
>> larry adds the convenience of labels, provides many built-in methods,
>> and let's you use many of your existing array functions.
>>
>> Download: https://launchpad.net/larry/+download
>> docs  http://larry.sourceforge.net
>> code  https://launchpad.net/larry
>> list  http://groups.google.ca/group/pystatsmodels
>>
>> =============
>> Release Notes
>> =============
>>
>> la 0.2 (avocado)
>> ================
>>
>> *Release date: 2010-04-27*
>>
>> New larry methods
>> -----------------
>> - lix : Index into a larry using labels or index numbers or both
>> - swapaxes : Swap the two specified axes
>> - sortaxis : Sort data (and label) according to label along specified axis
>> - flipaxis : Reverse the order of the elements along the specified axis
>> - tocsv : Save larry to a csv file
>> - fromcsv : Load a larry from a csv file
>> - insertaxis : Insert a new axis at the specified position
>> - invert : Element by element inverting of True to False and False to True
>>
>> Enhancements
>> ------------
>> - All larry methods can now take nd input arrays (some previously 2d only)
>> - Added ability to save larrys with datetime.date labels to HDF5
>> - New function (panel) to convert larry of shape (n, m, k) to shape (m*k, n)
>> - Expanded documentation
>> - Over 280 new unit tests; testing easier with new assert_larry_equal function
>>
>> Bug fixes
>> ---------
>> - #517912: larry([]) == larry([]) raised IndexError
>> - #518096: larry.fromdict failed due to missing import
>> - #518106: la.larry.fromdict({}) failed
>> - #518114: fromlist([]) and fromtuples([]) failed
>> - #518135: keep_label crashed when there was nothing to keep
>> - #518210: sum, std, var returned NaN for empty larrys; now return 0.0
>> - #518215: unflatten crashed on an empty larry
>> - #518442: sum, std, var returned NaN for shapes that contain zero: (2, 0, 3)
>> - #568175: larry.std(axis=-1) and var crashed on negative axis input
>> - #569622: Negative axis input gave wrong output for several larry methods
>> _______________________________________________
>> SciPy-User mailing list
>> SciPy-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-user
>>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>


More information about the SciPy-User mailing list