Calculate exp(element) - 1 in the input array.
SciPhp\NdArray
NumPhp::exp(
array|NdArray
$m
)
$m
use SciPhp\NumPhp as np;
$m = np::ar([0.0001, 0.00001, 0.000001])->expm1();
echo "m\n$m";
The above example will output:
m [0.00010000500016667 1.0000050000167E-5 1.0000005000002E-6 ]
use SciPhp\NumPhp as np;
$m = np::diag([0.01, 0.05, 0.001]);
$r = $m->expm1();
echo "m\n$m", "r\n$r";
The above example will output:
m [[0.1 0 0 ] [0 0.05 0 ] [0 0 0.01]] r [[0.10517091807565 0 0 ] [0 0.051271096376024 0 ] [0 0 0.010050167084168]]