|
From: Edward H. <ha...@co...> - 2003-04-14 11:27:41
|
On Sunday, April 13, 2003, at 06:37 am, Francesc Alted wrote:
> A Dissabte 12 Abril 2003 17:43, Edward Hartley va escriure:
>>
Many thanks for the speedy reply
>> is there going to be support for arrays in tabels
>> specifically what I'm trying to do is put arrays into
>> tables as leafs. I may be mistaken but I think this is
>> currently not supported but the creation of arrays from
>> table data is.
>
> I don't understand well your question. The Array and Table objects are
> Leaf
> objects, so you can't have an Array with a Table as parent.
>
Sorry about my inaccuracy about the terminology
> However, Table do accept numarray arrays as columns elements in this
> way:
>
> field = Col("Float32", 3)
>
yes I was aware of that
> where 3 means the number of elements of your array. 0.4 version only
> supports unidimensional arrays as elements, however. This is an actual
> limitation on numarray code, that will be removed soon (I hope).
>
Ah I hadn't realised
> Another possibility may be to use attributes to attach an array to a
> Table
> object through the use of the setAttr() method available on Leaf
> objects.
> Right now, only character attributes are supported, but by combining
> them
> with cPikle, you can attach any object you may want to a Leaf.
>
This is interesting
I have found another way to get around the issue by specifying the
shape in one field
class my_array(IsDescription):
array_ shape = Col('UInt8', shape)
ravelled_array=Col('UInt8' , data)
it occurs to me that with suitable accessor methods this would solve it
completely?
many thanks once again
Ed Hartley
>
> --
> Francesc Alted
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Etnus, makers of TotalView, The
> debugger
> for complex code. Debugging C/C++ programs can leave you feeling lost
> and
> disoriented. TotalView can help you find your way. Available on major
> UNIX
> and Linux platforms. Try it free. www.etnus.com
> _______________________________________________
> Pytables-users mailing list
> Pyt...@li...
> https://lists.sourceforge.net/lists/listinfo/pytables-users
>
|