--- id: sparsediffpy version: "0.6.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # sparsediffpy — Python bindings for SparseDiffEngine algorithmic differentiation License: permissive · Maintenance: active · Downloads: 1.5M/mo ## What it is and what it does SparseDiffPy is a Python wrapper around SparseDiffEngine, a C library specialized in computing sparse Jacobians and Hessians—the first and second derivatives of functions that have sparse structure. It bridges high-level Python code to low-level compiled differentiation routines, allowing developers to leverage algorithmic differentiation without writing C directly. The package depends only on numpy and targets modern Python versions (3.11+), with pre-built wheels available for macOS, Linux, and Windows across multiple architectures. It is actively maintained with no known security vulnerabilities. The primary use case is numerical optimization, machine learning, and scientific computing workflows where computing derivatives efficiently is critical and the underlying functions exhibit sparsity patterns that can be exploited for speed. Use it for: - Computing sparse Jacobians for large-scale optimization problems where most partial derivatives are zero. - Efficient Hessian computation in machine learning model training and hyperparameter optimization. - Numerical simulations and scientific computing where derivative evaluation is a bottleneck. - Sensitivity analysis in engineering and physics simulations with sparse dependency graphs. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. SparseDiffPy provides Python bindings to compute sparse Jacobians and Hessians via the SparseDiffEngine C library, enabling efficient algorithmic differentiation for numerical optimization and machine learning workflows. Yes, if you need efficient sparse Jacobian or Hessian computation in Python. The package is actively maintained, has no known vulnerabilities, uses a permissive license, and provides a clean Python interface to a specialized C library. Install friction is moderate but manageable with pre-built wheels. Primary consideration: verify that the _sparsediffengine API matches your differentiation needs before committing to a production workflow. ## Install pip install sparsediffpy uv add sparsediffpy poetry add sparsediffpy ## Installing sparsediffpy Before you install: Medium install friction due to compiled wheels across multiple Python versions and platforms. Package is actively maintained with a recent release, and requires only numpy as a runtime dependency. License in practice: Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution. Quickstart: pip install sparsediffpy from sparsediffpy import _sparsediffengine Requires Python 3.11 or later (requires_python: >=3.11). Verify before relying: - Specific capabilities and API surface of _sparsediffengine module beyond import. - Performance characteristics or scale limits for sparse Jacobian/Hessian computation. - Whether the package is suitable for production use or primarily experimental. - Typical use patterns and integration with numpy workflows. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 1.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags sparse jacobian hessian computation, algorithmic differentiation python, sparse automatic differentiation, jacobian matrix calculation, efficient gradient computation, automatic-differentiation, numerical-optimization, sparse-computation [View on SkillFed](https://skillfed.io/packages/sparsediffpy) · [View on PyPI](https://pypi.org/project/sparsediffpy/)