UT3Tangent.entries_derivatives#
- t3toolbox.uniform_manifold.UT3Tangent.entries_derivatives(index, pp, order)#
def entries_derivatives( self, index: NDArray, # int, shape=(d,)+W -- the grid points pp: typ.Sequence[NDArray], # perturbation vectors P, len=d, elm_shape=W+(Ni,) order: int, # highest derivative order ) -> NDArray: # scalar jets, shape=(order+1,)+W+K+C
Symmetric entry derivatives at
indexin directionP(derivative twin ofentries(); the bare𝒥).indexandppshareW. Uniform mirror ofentries_derivatives().Examples
>>> import numpy as np >>> import t3toolbox.tucker_tensor_train as t3 >>> import t3toolbox.uniform_tucker_tensor_train as ut3 >>> import t3toolbox.uniform_manifold as ut3m >>> np.random.seed(0) >>> x = ut3.UniformTuckerTensorTrain.from_t3(t3.TuckerTensorTrain.randn((10, 11, 12), (5, 6, 4), (1, 2, 3, 1))) >>> v = ut3m.UNIFORM_COREWISE.randn(ut3m.UNIFORM_MANIFOLD.frame(x)) >>> pp = (np.random.randn(10), np.random.randn(11), np.random.randn(12)) >>> yj = v.entries_derivatives(np.array([3, 5, 7]), pp, 3) >>> print(yj.shape, bool(np.allclose(yj[0], v.entries((3, 5, 7))))) # (order+1,); order 0 == entries (4,) True