Number of elements of an array.
int
NdArray::size
A positive integer.
use SciPhp\NumPhp as np;
$m = np::linspace(1, 9, 9)->reshape(3, 3);
$size = $m->size;
echo "m\n$m", "m->size=$size\n";
The above example will output:
m [[1 2 3] [4 5 6] [7 8 9]] m->size=9