23

Is there support for sparse matrices in python?

Possibly in numpy or in scipy?

1

2 Answers 2

41

Yes.

SciPi provides scipy.sparse, a "2-D sparse matrix package for numeric data".

There are seven available sparse matrix types:

  1. csc_matrix: Compressed Sparse Column format
  2. csr_matrix: Compressed Sparse Row format
  3. bsr_matrix: Block Sparse Row format
  4. lil_matrix: List of Lists format
  5. dok_matrix: Dictionary of Keys format
  6. coo_matrix: COOrdinate format (aka IJV, triplet format)
  7. dia_matrix: DIAgonal format
Sign up to request clarification or add additional context in comments.

Comments

5
  1. CVXOPT - Sparse matrices

  2. Pysparse

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.