I'm writing a wrapper for sparse matrices (CSR format) and therefore need to store three vectors and 3 scalars:
- data (float64 vector) - indices (int32 vector) - indptr (int32 vector) - nrows (int32 scalar) - ncols (int32 scalar) - nnz (int32 scalar) data and indices will always be the same length as each other (=nnz) but the indptr vector is much shorter. I've written routines that allow you to insert/update/delete rows or columns of the matrix by acting on these vectors only. However I'm struggling to work out the best pytables structure to store these, that allows me to append/insert/delete elements easily, and is efficient. I was using a Group with an EArray for each vector. This works ok but it seems like you are unable to delete items - is that correct? I also tried using a Group with a separate Table for each of the vectors (I could possibly just have two - one for data and indices and the other for indptr), but this seems to add a lot of overhead in manipulating the arrays. Is there something simple I'm missing? Tom ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Pytables-users mailing list Pytables-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytables-users