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