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

Reshapes using unsigned 32-bit dimensions, without changing element order.

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([2u, 3u])
print(values.shape)