Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Readme
.. image:: https://readthedocs.org/projects/prime/badge/?version=latest :target: https://prime.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status
.. image:: https://img.shields.io/badge/License-MIT-blue.svg :target: https://lbesson.mit-license.org/ :alt: MIT License
Numerical differentiation methods for python, including:
Symmetric finite difference schemes using arbitrary window size.
Savitzky-Galoy derivatives of any polynomial order with independent left and right window parameters.
Spectral derivatives with optional filter.
Spline derivatives of any order.
Polynomial-trend-filtered derivatives generalizing methods like total variational derivatives.
These examples are intended to survey some common differentiation methods. The goal of this package is to bind these common differentiation methods to an easily implemented differentiation interface to encourage user adaptation.
Usage:
.. code-block:: python
from primelab import dxdt
import numpy as np
t = np.linspace(0,2*np.pi,50)
x = np.sin(x)
# Finite differences with central differencing using 3 points.
result1 = dxdt(x, t, kind="finite_difference", k=1)
# Savitzky-Golay using cubic polynomials to fit in a centered window of length 1
result2 = dxdt(x, t, kind="savitzky_golay", left=.5, right=.5, order=3)
# Spectral derivative
result3 = dxdt(x, t, kind="spectral")
# Spline derivative with smoothing set to 0.01
result4 = dxdt(x, t, kind="spline", s=1e-2)
# Total variational derivative with regularization set to 0.01
result5 = dxdt(x, t, kind="trend_filtered", order=0, alpha=1e-2)
Project references:
[1] Numerical differentiation of experimental data: local versus global methods- K. Ahnert and M. Abel
[2] Numerical Differentiation of Noisy, Nonsmooth Data- Rick Chartrand
[3] The Solution Path of the Generalized LASSO- R.J. Tibshirani and J. Taylor
FAQs
Numerical differentiation in python.
We found that primelab 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.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).