El dt 24 de 04 del 2007 a les 16:24 +0100, en/na Michael Hoffman va
escriure:
> Are there any reasons one would choose to use an Array rather than a CArray?

Well, for saving arrays you have basically three possibilities for
dealing with regular arrays:

Array -- Quick and dirty manipulation of arrays. However, it doesn't
support compression and it is not extendible (i.e. the array cannot grow
on disk once it is created).  It is the faster method for doing I/O (see
[1]).

CArray -- The creation method is a bit more complex (needs more
arguments). In exchange, it allows to use compression. However, it is
not extendible. It is quite slow at writing, but pretty good at reading.

EArray -- The creation method is similar than CArray. It allows
compression and it is extendible. It is quite fast at extending, and
pretty good at reading.

In addition, for handling arrays with rows that have a variable length
of elements (also called 'ragged arrays') you can use:

VLArray -- It allows to create 'ragged arrays' on disk. Those can be
compressible and extendible.  I/O is not very fast.

Finally, if your arrays are made of 'records', you can use the:

Table -- It allows to create unidimensional arrays of datatypes that are
made of other types (even nested types are supported). This object has
possibly the most complex API of all, but it is also the most powerful.
It is quite fast at extending and pretty fast at reading.

So, you have a handful of options to choose.  Again, look at [1] for a
small benchmark that I've conducted some days ago.

Mmm, perhaps it would be nice to convert this message in an entry at the
PyTables FAQ.

[1]
http://projects.scipy.org/pipermail/scipy-user/2007-April/011724.html

HTH,

-- 
Francesc Altet    |  Be careful about using the following code --
Carabos Coop. V.  |  I've only proven that it works, 
www.carabos.com   |  I haven't tested it. -- Donald Knuth


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to