SciPy.org SciPy 0.6.0 API Documentation Generated by Endo, 2007-10-17

Read sparse matrix type

Matlab (TM) 4 real sparse arrays are saved in a N+1 by 3 array format, where N is the number of non-zero values. Column 1 values [0:N] are the (1-based) row indices of the each non-zero value, column 2 [0:N] are the column indices, column 3 [0:N] are the (real) values. The last values [-1,0:2] of the rows, column indices are shape[0] and shape[1] respectively of the output matrix. The last value for the values column is a padding 0. mrows and ncols values from the header give the shape of the stored matrix, here [N+1, 3]. Complex data is saved as a 4 column matrix, where the fourth column contains the imaginary component; the last value is again 0. Complex sparse data do _not_ have the header imagf field set to True; the fact that the data are complex is only detectable because there are 4 storage columns

Inherits from

Method summary

Methods