• Initializes a new tensor.

    Parameters

    • Rest ...tensor: ChalkboardTensor[]

      The n-dimensional array either as a sequence of arrays or one array

    Returns ChalkboardTensor

    Example

    // Defines a 2x2x2 tensor [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
    let A = Chalkboard.tens.init([[1, 2], [3, 4]],
    [[5, 6], [7, 8]]);
    let B = Chalkboard.tens.init([[[1, 2], [3, 4]],
    [[5, 6], [7, 8]]]);

Generated using TypeDoc