method

empty

Importance_1
empty(row_size = 0, column_size = 0) public

Creates a empty matrix of row_size x column_size. At least one of row_size or column_size must be 0.

m = Matrix.empty(2, 0)
m == Matrix[ [], [] ]
  => true
n = Matrix.empty(0, 3)
n == Matrix.columns([ [], [], [] ])
  => true
m * n
  => Matrix[[0, 0, 0], [0, 0, 0]]
Show source
Register or log in to add new notes.