Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Functional Models and Algorithms for Sparse Signal Processing

PyPI cr-sparse License DOI Documentation Status Unit Tests Coverage JOSS


CR-Sparse is a Python library that enables efficiently solving a wide variety of sparse representation based signal processing problems. It is a cohesive collection of sub-libraries working together. Individual sub-libraries provide functionalities for: wavelets, linear operators, greedy and convex optimization based sparse recovery algorithms, subspace clustering, standard signal processing transforms, and linear algebra subroutines for solving sparse linear systems. It has been built using Google JAX, which enables the same high level Python code to get efficiently compiled on CPU, GPU and TPU architectures using XLA.


For detailed documentation and usage, please visit online docs.

For theoretical background, please check online notes at Topics in Signal Processing and references therein (still under development).

CR-Sparse is part of CR-Suite.

Related libraries:

Supported Platforms

CR-Sparse can run on any platform supported by JAX. We have tested CR-Sparse on Mac and Linux platforms and Google Colaboratory.

  • The latest code in the library has been tested against JAX 0.4.

JAX is not officially supported on Windows platforms at the moment. Although, it is possible to build it from source using Windows Subsystems for Linux. Alternatively, you can check out the community supported Windows build for JAX available from This seems to work well and all the unit tests in the library have passed on Windows also.


Installation from PyPI:

python -m pip install cr-sparse

Directly from our GITHUB repository:

python -m pip install git+


See the examples gallery in the documentation. Here is a small selection of examples:

A more extensive collection of example notebooks is available in the companion repository. Some micro-benchmarks are reported here.

Contribution Guidelines/Code of Conduct

Citing CR-Sparse

To cite this library:

  doi = {10.21105/joss.03917},
  url = {},
  year = {2021},
  publisher = {The Open Journal},
  volume = {6},
  number = {68},
  pages = {3917},
  author = {Shailesh Kumar},
  title = {CR-Sparse: Hardware accelerated functional algorithms for sparse signal processing in Python using JAX},
  journal = {Journal of Open Source Software}

Documentation | Code | Issues | Discussions |