sparse
Sparse n-dimensional arrays for the PyData ecosystem
Decision gist · record as of 2026-08-14
Yes, if you work with sparse high-dimensional data in scientific or machine learning contexts and want NumPy-compatible semantics. The low install friction, active maintenance, and permissive license make it a reasonable choice. Be aware the library is pre-alpha, so expect potential API changes; verify that the sparse formats and operations you need are supported before committing to a production dependency.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11 or later.
- Low install friction with a pure-Python wheel distribution.
- Active maintenance with a release on 2026-08-14 and recent commits.
License · maintenance · safety
permissive license (permissive) — BSD 3-Clause License permits commercial and private use with minimal restrictions; you must retain copyright notices and disclaimers in source distributions.
last release 2026-08-14 (0 days) · last repo commit 2026-08-14 · 666 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,543,346 downloads/mo, #3,782 on PyPI
Alternatives
Verify before relying
import sparse
import numpy as np
# Create a sparse array from a dense array
dense = np.array([[0, 0], [0, 2]])
sparse_arr = sparse.COO.from_numpy(dense)
print(sparse_arr)- Which sparse formats (COO, CSR, CSC, etc.) are supported by the library.
- Performance characteristics compared to other sparse array libraries for typical workloads.
- Extent of Numba JIT acceleration and which operations benefit most.
- API stability guarantees given the pre-alpha development status.
What it is and what it does
Sparse provides multi-dimensional sparse array objects for the PyData ecosystem, built on NumPy and Numba. Unlike dense arrays where every element is stored, sparse arrays only store non-zero values and their coordinates, dramatically reducing memory use for data that is mostly zeros or empty. The library integrates with NumPy's API conventions, making it familiar to scientists and data engineers already working with NumPy arrays.
The package is actively maintained and sits in the top 5000 PyPI packages by download volume. It targets Python 3.10, 3.11, and 3.12, and carries a BSD 3-Clause License. The library is marked as pre-alpha in its development status, indicating the API may evolve, but it is actively developed with recent releases and community support channels.
Use it for
- Store and manipulate large tensors with mostly zero values, such as sparse feature matrices in machine learning pipelines.
- Perform operations on high-dimensional sparse data without materializing dense intermediates.
- Integrate sparse array computations into NumPy-based scientific workflows with minimal API friction.
- Accelerate sparse array operations using Numba's JIT compilation for performance-critical code paths.
- Work with sparse representations of graphs, networks, or other naturally sparse data structures.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with sparse high-dimensional data in scientific or machine learning contexts and want NumPy-compatible semantics.
The low install friction, active maintenance, and permissive license make it a reasonable choice. Be aware the library is pre-alpha, so expect potential API changes; verify that the sparse formats and operations you need are supported before committing to a production dependency.
Install
sparse on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with a release on 2026-08-14 and recent commits. Requires NumPy and Numba as runtime dependencies.
Requires Python 3.11 or later.
License in practice
BSD 3-Clause License permits commercial and private use with minimal restrictions; you must retain copyright notices and disclaimers in source distributions.
Quickstart
import sparse
import numpy as np
# Create a sparse array from a dense array
dense = np.array([[0, 0], [0, 2]])
sparse_arr = sparse.COO.from_numpy(dense)
print(sparse_arr)
Verify before relying
- Which sparse formats (COO, CSR, CSC, etc.) are supported by the library.
- Performance characteristics compared to other sparse array libraries for typical workloads.
- Extent of Numba JIT acceleration and which operations benefit most.
- API stability guarantees given the pre-alpha development status.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesnumpynumba |
| Maintenance | Actively maintained 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,543,346 / month, #3,782 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 2 - Pre-AlphaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12 |
Evidence: sparse-0.19.2-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sparse multidimensional arrays”
- sparseProvides multi-dimensional sparse array data structures compatible…
- tiledbTileDB-Py provides a Python interface to the TileDB array storage…
- fast-array-utilsConverts and computes statistics across sparse, dense, GPU, and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Mathematics packages
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.
Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.
SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.
onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.
Install it if you have ONNX models to run in production or development.
See also tiledb · xarray · fast-array-utils · numbagg · numpy · tensorstore · unfoldNd · ndcube · linopy · arraykit