Back to NDArray Operations
reshape
Reshape an array to the given dimensions. Total element count must match.
Syntax
reshape(a: NDArray, n: Int64) → r
Backends
TypeScriptnumwa
Description
Reshape an array to the given dimensions. Total element count must match.
Parameters
| Name | Description |
|---|---|
| a | Input array |
| n | New first dimension (or single dimension for 1D) |
Returns
NDArray with the new shape, sharing the same data