Flatten an array
SciPhp\NdArray
NdArray::ravel()
This function has no parameters.
The new SciPhp\NdArray
use SciPhp\NumPhp as np;
$x = np::ar(
[[[1, 2, 3],
[4, 5, 6],
[7, 8, 9] ]]
);
echo $x->ravel();
The above example will output:
[1 2 3 4 5 6 7 8 9]