
Research
Malicious npm Package Brand-Squats TanStack to Exfiltrate Environment Variables
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.
jacobi
Advanced tools
.. |jacobi| image:: https://hdembinski.github.io/jacobi/_images/logo.svg :alt: jacobi
.. image:: https://img.shields.io/pypi/v/jacobi :target: https://pypi.org/project/jacobi .. image:: https://img.shields.io/badge/github-docs-success :target: https://hdembinski.github.io/jacobi .. image:: https://img.shields.io/badge/github-source-blue :target: https://github.com/HDembinski/jacobi .. image:: https://zenodo.org/badge/270612858.svg :target: https://zenodo.org/badge/latestdoi/270612858
Fast numerical derivatives for analytic functions with arbitrary round-off error and error propagation.
Click here for full documentation <https://hdembinski.github.io/jacobi>_.
DERIVEST <https://de.mathworks.com/matlabcentral/fileexchange/13490-adaptive-robust-numerical-differentiation>_: works even with functions that have large round-off errornumdifftools <https://pypi.org/project/numdifftools>_ at equivalent precision.. code-block:: python
from matplotlib import pyplot as plt import numpy as np from jacobi import jacobi
def f(x): return np.sin(x) / x
x = np.linspace(-10, 10, 200) fx = f(x)
fdx, fdxe = jacobi(f, x, diagonal=True)
plt.plot(x, fx, color="k", label="$f(x) = sin(x) / x$") plt.plot(x, fdx, label="$f'(x)$ computed with jacobi") scale = 14 plt.fill_between( x, fdx - fdxe * 10scale, fdx + fdxe * 10scale, label=f"$f'(x)$ error estimate$\times \, 10^{{{scale}}}$", facecolor="C0", alpha=0.5, ) plt.legend()
.. image:: https://hdembinski.github.io/jacobi/_images/example.svg
.. code-block:: python
from jacobi import propagate import numpy as np from scipy.special import gamma
def fn(x): r = np.empty(3) r[0] = 1.5 * np.exp(-x[0] ** 2) r[1] = gamma(x[1] ** 3.1) r[2] = np.polyval([1, 2, 3], x[0]) return r # x and r have different lengths
x = [1.0, 2.0] xcov = [[1.1, 0.1], [0.1, 2.3]] y, ycov = propagate(fn, x, xcov) # y=f(x) and ycov = J xcov J^T
Speed ^^^^^
Jacobi makes better use of vectorized computation than numdifftools and converges rapidly if the derivative is trivial. This leads to a dramatic speedup in some cases.
Smaller run-time is better (and ratio > 1).
.. image:: https://hdembinski.github.io/jacobi/_images/speed.svg
Precision ^^^^^^^^^
The machine precision is indicated by the dashed line. Jacobi is comparable in accuracy to numdifftools. The error estimate has the right order of magnitude but slightly underestimates the true deviation. This does not matter for most applications.
.. image:: https://hdembinski.github.io/jacobi/_images/precision.svg
FAQs
Compute numerical derivatives
We found that jacobi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.

Research
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.