public reshape(notnull shape as ArrayList<Object>) as NDArray<T>
Reshapes using a vector mixing integer widths, such as ULong metadata and Int literals. Only integer dimensions are accepted; no floating-point truncation or implicit signed/unsigned arithmetic is performed.
| Parameter | Description |
|---|---|
shape | Positive integer dimensions whose product equals the element count. |
A reshaped copy with the same element type.
values = NDArray<Float>.ones([2, 3]) images = values.reshape([values.shape[0], 3, 1]) print(images.shape)