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

Creates a NDArray sampled from a standard normal distribution using a tuple shape.

a = NDArray<Double>.randn((2, 3))
print(a)
Parameters
ParameterDescription
shapeFixed-size tuple of dimensions.
Returns

A random NDArray with mean close to 0.

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