check_perturbation_vectors#

t3toolbox.backend.sampling_derivatives.check_perturbation_vectors(ww, pp)#
def check_perturbation_vectors(
        ww: typ.Sequence[NDArray],  # points X,       len=d, elm_shape=W+(Ni,)
        pp: typ.Sequence[NDArray],  # perturbation P, len=d, elm_shape=W+(Ni,)
) -> None:

Structural check (hard error): the perturbation P (pp) shares the sample stack W and mode dims of the points X (ww) – each sample pairs a point with a direction. Used by the derivative-probe/apply frontends; shapes are static, so this is jit-safe.

Parameters:
  • ww (t3toolbox.backend.common.typ.Sequence[NDArray])

  • pp (t3toolbox.backend.common.typ.Sequence[NDArray])

Return type:

None