Converts an array to a matrix.

  • Parameters

    • arr: number[]

      The array

    • rows: number

      The number of rows of the matrix

    • Optionalcols: number = rows

      The number of columns of the matrix (optional, defaults to the number of rows to make a square matrix)

    Returns ChalkboardMatrix