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

Creates a new NDArray with ones.

Parameters
  • shape The shape of the array.
Returns

A new NDArray filled with 1. a = NDArray<Int>.ones([2, 2])