Pycaputo

Latest version: v0.9.0

Safety actively analyzes 723177 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.9.0

------------------------------

Dependencies
^^^^^^^^^^^^

* Switch to the `pymittagleffler <https://github.com/alexfikl/mittagleffler>`__
library to evaluate the Mittag-Leffler function. This should be a lot faster
and generally cleaner. The code in ``pycaputo.mittagleffler`` has been completely
removed.

Features
^^^^^^^^

* Add some more chaotic systems examples: Labyrinth, Chua, Qi, Lorenz-84. They
are all listed in :mod:`pycaputo.fode.gallery`.
* Add some neuron models: FtizHugh-Nagumo, FitzHugh-Rinzel, Morris-Lecar,
Hindmarsh-Rose, Hodgkin-Huxley. This is on top of the existing Integrate-and-Fire
models from :mod:`pycaputo.integrate_fire`. They can be found in
:mod:`pycaputo.fode.gallery`.
* Made :class:`~pycaputo.fode.caputo.Trapezoidal` a bit faster by avoiding
multiple ``einsum``.
* Added an implementation for variable-order fractional operators based on
[Garrappa2023]_. We implement a variable-order Riemann-Liouville integral in
:class:`~pycaputo.quadrature.variable_riemann_liouville.ExponentialRectangular`
and an FODE solver for a variable-order Caputo derivative in
:class:`~pycaputo.fode.variable_caputo.VariableExponentialBackwardEuler`.
As the name suggest, this only supports the exponential decaying order
:math:`\alpha(t) = \alpha_2 + (\alpha_1 - \alpha_2) e^{-c t}` from the paper.

Breaking Changes
^^^^^^^^^^^^^^^^

* :class:`~pycaputo.stepping.FractionalDifferentialEquationMethod` now takes
a tuple of :class:`~pycaputo.derivatives.FractionalOperator` instances, not
just derivative orders. This requires changing ``derivatives=(alpha, ...)``
to ``ds=(CaputoDerivative(alpha), ...)``.
* Removed the ``gamma1p``, ``gamma2p``, ``gamma2m`` functions from
:mod:`pycaputo.stepping`. Maybe the Caputo classes will cache them in the
future.
* All :class:`~pycaputo.stepping.FractionalDifferentialEquationMethod` need to
also define :meth:`~pycaputo.stepping.FractionalDifferentialEquationMethod.make_default_history`.

Maintenance
^^^^^^^^^^^

* Switched to `just <https://just.systems/man/en/>`__ for running all the simple
development and CI commands. ``just`` is less available than ``make``, but it
is much nicer and self-documenting.

0.8.1

---------------------------------

Dependencies
^^^^^^^^^^^^

* Add official support for Python 3.13.

Features
^^^^^^^^

* Add :class:`~pycaputo.fode.caputo.BackwardEuler` as a special case of
:class:`~pycaputo.fode.caputo.WeightedEuler` (that should also be slightly
faster).

Fixes
^^^^^

* Make :class:`~pycaputo.controller.FixedController` work correctly when doubling
the time step. Now, when calling :func:`~pycaputo.controller.make_fixed_controller`
with ``dt1`` and ``dt2 = dt1/2``, you'll get exactly double the time steps and they
interlock in such a way that ``t1 == t2[::2]``.

0.8.0

----------------------------------

Dependencies
^^^^^^^^^^^^

* Bumped minimum Python version to 3.10. This is a hard requirement, as it
comes with some changes to the typing syntax and other functions
(e.g. we make use of ``zip(..., strict=True)``).

Features
^^^^^^^^

* Add a :mod:`pycaputo.typing` module containing some helpful typing definitions
(mostly previously in :mod:`pycaputo.utils`).
* Reworked :func:`~functools.singledispatch` functions for
:class:`~pycaputo.differentiation.DerivativeMethod`. We now have
:func:`~pycaputo.differentiation.quadrature_weights`,
:func:`~pycaputo.differentiation.differentiation_matrix`,
:func:`~pycaputo.differentiation.diffs`, and
:func:`~pycaputo.differentiation.diff`. Not all of these need to be implemented
and most methods are not ported yet. Currently only the
:class:`~pycaputo.differentiation.caputo.L1` and
:class:`~pycaputo.differentiation.caputo.L2` methods implement these new functions.
* Introduce some more specific methods for the Caputo derivative. The
:class:`~pycaputo.differentiation.caputo.L2F` uses the L2 method with function
evaluations outside of the interval of definition. The
:class:`~pycaputo.differentiation.caputo.LXD` allows evaluating arbitrary
Caputo derivatives when the integer derivatives are known.
* Added a lot of fancy chaotic systems to :mod:`pycaputo.fode.gallery`. These
are mostly used to showcase the library.

Breaking Changes
^^^^^^^^^^^^^^^^

* Renamed `pycaputo.differentiation.caputo.SpectralJacobi` to
:class:`~pycaputo.differentiation.caputo.Jacobi`.

0.7.0

------------------------------

Dependencies
^^^^^^^^^^^^

* Official support for numpy 2.0. Everything works and is tested on the CI!

Features
^^^^^^^^

* Extend :class:`~pycaputo.fode.caputo.PECE`, :class:`~pycaputo.fode.caputo.PEC`
and :class:`~pycaputo.fode.caputo.ModifiedPECE` to support systems with different
orders (:ghpr:`46` and :ghissue:`17`).
* Implement diffusive methods for evaluating the Riemann-Liouville integral (:ghpr:`48`):
:class:`~pycaputo.quadrature.riemann_liouville.YuanAgrawal`,
:class:`~pycaputo.quadrature.riemann_liouville.Diethelm`, and
:class:`~pycaputo.quadrature.riemann_liouville.BirkSong`.
* Implement diffusive methods for evaluating the Caputo derivative (:ghpr:`49`):
:class:`~pycaputo.differentiation.caputo.YuanAgrawal`,
:class:`~pycaputo.differentiation.caputo.Diethelm`, and
:class:`~pycaputo.differentiation.caputo.BirkSong`.
* Implement approximations of the Grünwald-Letnikov derivative (:ghpr:`51`):
:class:`~pycaputo.differentiation.grunwald_letnikov.GrunwaldLetnikov`,
:class:`~pycaputo.differentiation.grunwald_letnikov.ShiftedGrunwaldLetnikov`,
:class:`~pycaputo.differentiation.grunwald_letnikov.TianZhouDeng2`, and
:class:`~pycaputo.differentiation.grunwald_letnikov.TianZhouDeng3`.
* Add derivatives of some known elementary functions in :mod:`pycaputo.special`
(:ghpr:`50`): ``exp``, ``sin``, ``cos`` and ``pow``. They're mainly based on
the Mittag-Leffler function.

Breaking Changes
^^^^^^^^^^^^^^^^

* Renamed ``RiemannLiouvilleFromCaputoDerivativeMethod`` to
:class:`~pycaputo.differentiation.riemann_liouville.RiemannLiouvilleFromCaputoMethod`.
* Renamed ``CaputoDerivativeMethod`` to
:class:`~pycaputo.differentiation.caputo.CaputoMethod`.

Fixes
^^^^^

* Fix convergence of :class:`~pycaputo.fode.caputo.ModifiedPECE` (:ghissue:`15`).

0.6.0

-----------------------------

Features
^^^^^^^^

* Implement Riemann-Lioville quadrature based on high-order Lagrange polynomials
in :class:`~pycaputo.quadrature.riemann_liouville.SplineLagrange`. These methods
require knowledge of the function :math:`f` being integrated, but can obtain
high order :math:`> 3`.
* Implement the implicit :class:`~pycaputo.fode.caputo.Trapezoidal` and
:class:`~pycaputo.fode.caputo.ExplicitTrapezoidal` methods. These methods are
closely related to the standard :class:`~pycaputo.fode.caputo.PECE` method.
The implicit method has better stability.
* Implement the Mittag-Leffler algorithm from `Garrappa2015 <https://doi.org/10.1137/140971191>`__.
* Added the :mod:`pycaputo.fode.special` module with some exact solutions. This
is subject to a lot of change, but in general it is desired to have some
examples for testing and demonstration.

Breaking Changes
^^^^^^^^^^^^^^^^

* The base :class:`~pycaputo.derivatives.FractionalOperator` no longer defines
an ``order`` attribute. This does not make sense for more complex operators
with multiple parameters.
* :mod:`pycaputo.differentiation` no longer exports all the underlying methods.
It is not required to do e.g. ``from pycaputo.differentiation.caputo import L1``.
* All the methods in :mod:`pycaputo.differentiation` have been renamed without the
derivative type, e.g ``CaputoL1Method`` becomes simply ``L1``.
* The methods in :mod:`pycaputo.differentiation` no longer provide an order. This
was not well-defined, since e.g. the L1 method has different orders depending
on the smoothness of the operand.
* The :mod:`pycaputo.quadrature` module went through similar changes to the
differentiation one.
* The :mod:`pycaputo.fode.caputo` module went through similar changes to the
differentiation and quadrature ones.

0.5.0

-------------------------------

Features
^^^^^^^^

* Implement an implicit adaptive L1 type method for Integrate-and-Fire models
in :mod:`pycaputo.integrate_fire`.
* Implement PIF, LIF, EIF and AdEx models explicitly. These can be used to model
neurons using fractional dynamics.

Maintenance
^^^^^^^^^^^

* Use `uv <https://github.com/astral-sh/uv>`__ to handled pinning dependencies.
* Use `hatchling <https://hatch.pypa.io>`__ as the build backend instead of ``setuptools``.
* Start using `pytest-benchmark <https://pytest-benchmark.readthedocs.io>`__ to
benchmark the code. This still needs a lot of work.

Page 1 of 2

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.