Calculate the exponential of all elements in the input array.
SciPhp\NdArray
NumPhp::expm1(
array|NdArray
$m
)
$m
use SciPhp\NumPhp as np;
$m = np::expm1([0, 0.1, 0.01]);
echo "m\n$m";
The above example will output:
m [0 0.10517091807565 0.010050167084168]
use SciPhp\NumPhp as np;
$m = np::diag([0.1, 0.05, 0.01]);
$r = np::expm1($m);
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]]