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

Creates a new NDArray with ones.

Parameters
ParameterDescription
shapeThe shape dimensions.
Returns

A new NDArray filled with 1.

Example
a = NDArray<Int>.ones([2, 2])