A Dimecres 20 Desembre 2006 18:21, David Huard escrigué:
> Hi,
>
> I have an array A belonging to some group, and would like to replace it by
> another array.
> I tried
>
> >>> gr.A.remove()
>
> but although this seems to work,  it does not seem to remove the array from
> memory, because the size of the file grows as I replace the array by
> another of the same size.
>
> Am I doing this the wrong way ?

I don't think so. As you know, PyTables is based in HDF5, and this
library doesn't free the space on disk when datasets are removed. If
you want to keep your file size under control, then you have a couple
of options:

- Use the array.__setitem__() so as to replace your data in-place

- Run ptrepack from time to time so as to compact your files.

Depending on your requirements, you may want to use one or the other.

Cheers,

-- 
>0,0<   Francesc Altet     http://www.carabos.com/
V   V   Cárabos Coop. V.   Enjoy Data
 "-"


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to