Numerical negative, element-wise.
SciPhp\NdArray
NumPhp::negative(
array|NdArray
$m
)
$m
The new SciPhp\NdArray
use SciPhp\NumPhp as np;
$x = np::arange(0, 10, 2);
echo np::negative($x);
The above example will output:
[0 -2 -4 -6 -8]