Chalkboard - v3.1.0
    Preparing search index...

    Function fill

    • Initializes a tensor filled with one number.

      Parameters

      • element: number

        The number to fill the elements with, which may be NaN or infinite

      • ...shape: number[]

        The shape

      Returns ChalkboardTensor

      const result = Chalkboard.tens.fill(1, 2, 2, 2); // Returns [[[1, 1], [1, 1]], [[1, 1], [1, 1]]]