public static ones(shape as ArrayList<Object>) as NDArray<T>:
Creates a new NDArray with ones.
shape
A new NDArray filled with 1.
1
dims = [2, 2] a = NDArray<Int>.ones(dims) print(a)