rxmc.transforms.identity#

rxmc.transforms.identity = Transform(identity)#

A numpy-style transform with optional parameters.

Parameters:
  • fn (callable) – fn(a, *values) -> np.ndarray; when contextual is True, fn(context, a, *values) where context is whatever the owner passes (the Observation for model transforms).

  • params (sequence of Parameter, optional) – Parameters whose sampled values are passed as *values.

  • contextual (bool, optional) – Whether fn takes the owner’s context as its first argument.

  • derivative (callable, optional) – derivative(a, *values) -> np.ndarray, \(\partial fn/\partial a\) elementwise. Used for delta-method error propagation and Jacobians.

  • inverse (Transform or callable, optional) – The inverse transform (parameter-free transforms only).

  • name (str, optional) – Human-readable name.