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

Accepts 64-bit signed shape dimensions without truncation.

Parameters
ParameterDescription
shapeNon-negative dimensions in row-major order.
Returns

The same result as the corresponding 32-bit shape overload.

Throws
  • NullException if shape is null at runtime; statically null arguments are rejected with TypeError.
Example
values = NDArray<Double>.ones([2l, 3l])
print(values.shape)