Skip to content

Latest commit

 

History

History
66 lines (33 loc) · 877 Bytes

File metadata and controls

66 lines (33 loc) · 877 Bytes

Home > @josh-brown/vector > MatrixBuilder > zeros

MatrixBuilder.zeros() method

Constructs a matrix of the specified dimensions, consisting of all zeros

Signature:

zeros(shape: MatrixShape): M;

Parameters

Parameter

Type

Description

shape

MatrixShape

The shape of the matrix as a tuple [m, n]

Returns:

M

The new matrix

Example

const allZeros = matrixBuilder.zeros([2, 3]);

// [ 0 0 0 ]
// [ 0 0 0 ]