mappy_ds.mapping#

mappy_ds.mapping(dom_dim, cod_dim=None)#

Declare a discrete map \(y \mapsto f(y, p)\).

Parameters:
dom_dimint

Dimension of the domain.

cod_dimint, optional

Dimension of the codomain, by default equal to dom_dim.

Examples

>>> import numpy as np
>>> from mappy_ds import mapping
>>> @mapping(2)
... def henon(y, p):
...     x, u = y
...     return np.array([1 - p["a"] * x**2 + u, p["b"] * x])
>>> henon([0.0, 0.0], {"a": 1.4, "b": 0.3})
array([1., 0.])