klyn.math.NDArray.reshape
method
public reshape(notnull shape as IList<ULong>) as NDArray<T>
Description

Reshapes using unsigned 64-bit dimensions, including existing shape metadata.

Parameters
ParameterDescription
shapeNon-negative dimensions whose product equals the element count.
Returns

A reshaped copy with the same element type.

Throws
  • ValueException If dimensions are empty, invalid or incompatible.
  • NullException if shape is null at runtime; statically null arguments are rejected with TypeError.
Example
values = NDArray<Float>.ones([6]).reshape([2ul, 3ul])
print(values.reshape(values.shape).shape)