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

Creates a new NDArray with ones.

Parameters
ParameterDescription
shapeThe shape of the array.
Returns

A new NDArray filled with 1.

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