Skip to main content

Sparse Matrices and Graphs

  • Chapter
  • First Online:
Numerical Python
  • 16k Accesses

Abstract

We have already seen numerous examples of arrays and matrices being the essential entities in many aspects of numerical computing. So far we have represented arrays with the NumPy ndarray data structure, which is a heterogeneous representation that stores all the elements of the array that it represents. In many cases, this is the most efficient way to represent an object such as a vector, matrix, or a higher-dimensional array. However, notable exceptions are matrices where most of the elements are zeros. Such matrices are known as sparse matrices, and they occur in many applications, for example, in connection networks (such as circuits) and in large algebraic equation systems that arise, for example, when solving partial differential equations (see Chapter 11 for examples).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    http://pysparse.sourceforge.net

  2. 2.

    http://trilinos.org/packages/pytrilinos

  3. 3.

    See http://www.mcs.anl.gov/petsc and https://bitbucket.org/petsc/petsc4py for its Python bindings.

  4. 4.

    http://docs.scipy.org/doc/scipy/reference/sparse.html

  5. 5.

    For a discussion of techniques and methods to optimize Python code, see Chapter 21.

  6. 6.

    http://crd-legacy.lbl.gov/~xiaoye/SuperLU/

  7. 7.

    http://faculty.cse.tamu.edu/davis/suitesparse.html

  8. 8.

    For more information about the JSON format and the json module, see Chapter 18.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Robert Johansson

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Johansson, R. (2019). Sparse Matrices and Graphs. In: Numerical Python . Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4246-9_10

Download citation

Publish with us

Policies and ethics