Change the sign to that of given matrix, element-wise.
SciPhp\NdArray
NdArray::copysign(
array|NdArray
$m
)
$m
use SciPhp\NumPhp as np;
$m = np::ar([-5, 5, 5])->copysign([1, 0, -1]);
echo "m\n$m";
The above example will output:
m [5 5 -5]