klyn.math.NDArray.zeros
method
public static zeros(notnull shape as IList<Int>) as NDArray<T>
Description

Creates a new NDArray with zeros.

Parameters
ParameterDescription
shapeThe shape dimensions.
Returns

A new NDArray filled with 0.

Throws
  • NullException if shape is null at runtime; statically null arguments are rejected with TypeError.
Example
a = NDArray<Int>.zeros([2, 2])