T3Tangent.entries_derivatives#
- t3toolbox.manifold.T3Tangent.entries_derivatives(index, pp, order)#
def entries_derivatives( self, index: NDArray, # int, shape=(d,)+W -- grid points pp: typ.Sequence[NDArray], # perturbation vectors P, len=d, elm_shape=W+(Ni,) order: int, # highest derivative order ) -> NDArray: # shape=(order+1,)+W+K+C
Symmetric directional derivatives of this tangent’s entries at
index, in directionP.The Taylor data of the tangent’s multilinear extension at grid corner
index, in directionP:y^(t) = d^t/ds^t apply(e_{index} + s P)|_0fort=0..order. Index0is the ordinaryentries(). Stacksorder + W + K + C.indexandPshareW.Examples
>>> import numpy as np >>> import t3toolbox.tucker_tensor_train as t3 >>> import t3toolbox.frame_variations_format as bvf >>> import t3toolbox.manifold as t3m >>> np.random.seed(0) >>> x = t3.TuckerTensorTrain.randn((10, 11, 12), (5, 6, 4), (1, 2, 3, 1)) >>> frame, variations = bvf.t3_orthogonal_representations(x) >>> v = t3m.T3Tangent(frame, variations) >>> index = np.array([3, 5, 7]) >>> pp = (np.random.randn(10), np.random.randn(11), np.random.randn(12)) >>> yj = v.entries_derivatives(index, pp, 3) >>> print(yj.shape) (4,) >>> print(bool(np.allclose(yj[0], v.entries(index)))) # order 0 == entries True