klyn.math.NDArray.full
method
public static full(notnull shape as Tuple, value as T) as NDArray<T>
Description

Creates a new NDArray filled with a given value using a tuple shape.

a = NDArray<Int>.full((2, 3), 7)
Parameters
ParameterDescription
shapeFixed-size tuple of dimensions.
valueThe fill value.
Returns

A new filled NDArray.

Throws
  • NullException if shape is null at runtime; statically null arguments are rejected with TypeError.