mask()#

NonuniformFiniteDifferencer.mask(arr)[source]#

Map an array from the training time domain to the domain of the estimated time derivatives. Since this class provides an estimate at every time step, this method simply returns arr.

This method is used in post-hoc regularization selection routines.

Parameters:
arr(…, k) ndarray

Array (states, inputs, etc.) aligned with the training time domain.

Returns:
_arr(…, k’) ndarray

Array mapped to the domain of the estimated time derivatives.

Examples

>>> Q, dQ = estimator.esimate(states)
>>> Q2 = estimator.mask(states)
>>> np.all(Q2 == Q)
True
>>> Q3 = estimator.mask(other_states_on_same_time_grid)
>>> Q3.shape == Q.shape
True