NDArray::flatten
public static function flatten(NDArray|array|float|int $a): NDArray;
Return a copy of the array $a
into one dimension.
Parameters
$a
Type
NDArray
array
scalar
- Target array
Return
Type - NDArray
- A copy of
$a
, with dimensions collapsed to 1-d, in the same device.
Notes
tip
GPU SUPPORTED
This operation is supported by GPU (VRAM) and contains a custom CUDA kernel.