[Numpy-discussion] ragged array implimentation

Francesc Alted faltet@pytables....
Mon Mar 7 11:33:00 CST 2011


A Monday 07 March 2011 18:28:11 Christopher Barker escrigué:
> Hi folks,
> 
> I'm setting out to write some code to access and work with ragged
> arrays stored in netcdf files. It dawned on me that ragged arrays
> are not all that uncommon, so I'm wondering if any of you have any
> code you've developed that I could learn-from borrow from, etc.
> 
> note that when I say a "ragged array", I mean a set of data where the
> each row could be a different arbitrary length:
> 
> 1, 2, 3, 4
> 5, 6
> 7, 8, 9, 10, 11, 12
> 13, 14, 15
> ...
> 
> In my case, these will only be 2-d, though I suppose one could have a
> n-d version where the last dimension was ragged (or any dimension, I
> suppose, though I'm having trouble wrapping my brain around what that
> would look like...
> 
> I'm not getting more specific about what I think the API should look
> like -- that is part of what I'm looking for suggestions, previous
> implementations, etc for.
> 
> Is there any "standard" way to work with such data?

A list of numpy arrays would not be enough?  Or you want something more 
specific?

-- 
Francesc Alted


More information about the NumPy-Discussion mailing list