>> 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
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
Apologies, sent to wrong group!
On 8 March 2012 16:26, Tom Diethe wrote:
> I'm having trouble resizing a matrix - the set_shape function seems to
> have no effect:
>
>>>> M
> <14x3562 sparse matrix of type ''
> with 6136 stored elements in
I'm having trouble resizing a matrix - the set_shape function seems to
have no effect:
>>> M
<14x3562 sparse matrix of type ''
with 6136 stored elements in LInked List format>
>>> M.set_shape((15,3562))
>>> M
<14x3562 sparse matrix of type ''
with 6136 stored elements in LInked Lis
I originally posted this on stackoverflow -
http://stackoverflow.com/questions/9002433/how-should-python-dictionaries-be-stored-in-pytables
so apologies for cross-posting, but maybe this was the better place to
start.
pytables doesn't natively support python dictionaries. The way I've
approached
Antonio Valentino tiscali.it> writes:
>
> Hi Tom,
>
> If my understanding is correct before calling csc_matrix you should
> actually read data from disk
>
> > data = f2.root.M.data[...]
> > ir = f2.root.M.ir[...]
> > jc = f2.root.M.jc[...]
>
> Please note that f3.root.M.data in a pytables ob
I have files stored using Matlab's sparse format (HDF5, csc I
believe), and I'm trying to use Pytables to operate on them directly,
but haven't succeeded yet. Using h5py I can do the following:
# Method 1: uses h5py (WORKS)
f1 = h5py.File(fname)
data = f1['M']['data]
ir = f1['M]['ir']
jc = f1['M']