dense_apply_derivatives ======================= .. py:function:: t3toolbox.backend.sampling_derivatives.dense_apply_derivatives(ww, pp, T, order) .. code-block:: python def dense_apply_derivatives( ww: typ.Sequence[NDArray], # probe vectors X, len=d, elm_shape=(Ni,) pp: typ.Sequence[NDArray], # perturbation vectors P, len=d, elm_shape=(Ni,) T: NDArray, # dense tensor, shape=(N0,...,N(d-1)) order: int, # highest derivative order ) -> NDArray: # apply-derivative jets, shape=(order+1,) Exact dense symmetric apply derivatives, by the all-modes multilinear subset expansion (oracle). ``apply(X+sP)`` is a polynomial in ``s`` of degree ``d``, so the ``t``-th derivative at ``s=0`` is ``y^(t) = t! * sum_{|S|=t, S subset of {0..d-1}} T contracted with {p_j: j in S, x_j: else}``, here contracting **every** mode (no free mode). Enumerates the size-``t`` subsets ``S`` -- testing only, unstacked.