Home > @josh-brown/vector > MatrixBuilder > zeros
Constructs a matrix of the specified dimensions, consisting of all zeros
Signature:
zeros(shape: MatrixShape): M;|
Parameter |
Type |
Description |
|---|---|---|
|
shape |
The shape of the matrix as a tuple |
Returns:
M
The new matrix
const allZeros = matrixBuilder.zeros([2, 3]);
// [ 0 0 0 ]
// [ 0 0 0 ]