Monotonic Rational Quadratic Spline

General MRQS object

class sinflow.mrqs.MonotonicRationalQuadraticSpline(x_knots, y_knots, fixed_end_slopes=False, extrapolate='linear')
derivative(x)

Compute the derivative dy/dx at given x.

Parameters:

xscalar or array-like

Input value(s).

Returns:

dy_dxscalar or ndarray

Derivative(s) at the input value(s).

forward(x)

Compute the forward transformation y = f(x) and its derivative dy/dx.

Parameters:

xscalar or array-like

Input value(s).

Returns:

yscalar or ndarray

Transformed value(s).

dy_dxscalar or ndarray

Derivative(s) at the input value(s).

inverse(y)

Compute the inverse transformation x = f^{-1}(y) and its derivative dx/dy.

Parameters:

yscalar or array-like

Output value(s).

Returns:

xscalar or ndarray

Inverted value(s).

dx_dyscalar or ndarray

Derivative(s) at the output value(s).