t3_ones#

t3toolbox.backend.t3_constructors.t3_ones(shape, stack_shape=(), use_jax=False)#
def t3_ones(
        shape:        typ.Tuple[int, ...],       # len=d, the tensor mode sizes (N0,...,N(d-1))
        stack_shape:  typ.Tuple[int, ...] = (),  # leading batch axes

        use_jax:      bool = False,  # constructor: no array inputs, so the flag chooses the output type
) -> typ.Tuple[
    typ.Sequence[NDArray],  # tucker_cores. len=d, rank-1, elm_shape=stack_shape+(1,Ni)
    typ.Sequence[NDArray],  # tt_cores.     len=d, rank-1, elm_shape=stack_shape+(1,1,1)
]:

Construct the rank-1 Tucker tensor train representing a tensor full of ones.

Parameters:
  • shape (t3toolbox.backend.common.typ.Tuple[int, Ellipsis])

  • stack_shape (t3toolbox.backend.common.typ.Tuple[int, Ellipsis])

  • use_jax (bool)

Return type:

t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray]]