Function create_tensor

  • Creates a Tensor from an array of elements. If the elements themselves are tensors, then that elements must be flattened, but the dimensionality is computed and incorporated into the created Tensor.

    Parameters

    • elements: U[]
    • Optional pos: number
    • Optional end: number

    Returns Tensor