la
la copied to clipboard
Meet larry, the labeled numpy array
``` In [1]: io = la.IO('test.h5') In [2]: io['a'] = la.lrange(10) In [3]: io['b/c/d'] = la.lrange(30) In [4]: io Out[4]: larry dtype shape ------------------- a int64 (10,) b/c/d int64 (30,)...
``` In [36]: io['d'] = la.lrange(10) In [37]: io.keys() Out[37]: [u'a', u'b', u'c/d/e', u'd'] In [38]: io[u'd'] = la.lrange(10) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) in () ----> 1...
``` In [6]: io = la.IO('test.h5') In [7]: io IOError: unable to open file (File accessibilty: Unable to open file) ``` Only occurs if file 'test.h5' doesn't exist.
I have noticed that when i convert larry into list and convert it back to larry using fromlist function, larry loses order if i have some custom ordering. It looks...
I think a good addition to la would be la.dot() and/or a dot method: lar1.dot(lar2, join='inner', fill=np.nan) where fill is used when the join method ('outer', 'left', 'right') creates new...
Current repr: ``` I[2] lar = la.rand(label=[['r1', '2'], ['c1', 'c2']]) I[3] lar O[3] label_0 r1 2 label_1 c1 c2 x array([[ 0.82931648, 0.62778716], [ 0.27239571, 0.5053495 ]]) ``` Could instead...
I have come across a situation where I would like to roll an axis on a larry, much like how one could do so with a regular numpy array. Could...