TuckerTensorTrain.entries_derivatives ===================================== .. py:method:: t3toolbox.tucker_tensor_train.TuckerTensorTrain.entries_derivatives(index, pp, order) .. code-block:: python def entries_derivatives( self, index: NDArray, # int, shape=(d,)+W -- grid points pp: Sequence[NDArray], # perturbation vectors P, len=d, elm_shape=W+(Ni,) order: int, # highest derivative order ) -> NDArray: # shape=(order+1,)+W+C Symmetric directional derivatives of this T3's entries at ``index``, in direction ``P``. The Taylor data of the represented tensor's multilinear extension at grid corner ``index``, in direction ``P``: ``y^(t) = d^t/ds^t apply(e_{index} + s P)|_0``. Index ``0`` is the ordinary :py:meth:`entries`. Stacks ``order + W + C``. ``index`` and ``P`` share ``W``. .. seealso:: :py:obj:`entries`, :py:obj:`apply_derivatives`, :py:obj:`entries_corewise_derivatives_transpose` .. rubric:: Examples >>> import numpy as np >>> import t3toolbox.tucker_tensor_train as t3 >>> np.random.seed(0) >>> x = t3.TuckerTensorTrain.randn((14, 15, 16), (4, 5, 6), (1, 3, 2, 1)) >>> index = np.array([3, 5, 7]) >>> pp = (np.random.randn(14), np.random.randn(15), np.random.randn(16)) >>> yj = x.entries_derivatives(index, pp, 3) >>> print(yj.shape) (4,) >>> print(bool(np.allclose(yj[0], x.entries(index)))) # order 0 == entries True