from scipy.sparse import csr_matrix
from scipy import array
row = array([0, 0, 1, 2, 2, 2])
col = array([0, 2, 2, 0, 1, 2])
data = array([1, 2, 3, 4, 5, 6])
mat = csr_matrix((data, (row, col)), shape=(3, 4))
m, n = mat.shape
s = mat.data
i = mat.tocoo().row
j = mat.indices
print(mat)
импорт разреженной матрицы Python в MATLAB