The non-negative square-root of an array, element-wise.
SciPhp\NdArray
NdArray::sqrt()
This function has no parameters.
The new SciPhp\NdArray
use SciPhp\NumPhp as np;
$m = np::vander([1, 4, 9]);
$n = $m->sqrt();
echo "m=n\n$m", "n=m*m\n$n";
The above example will output:
m=n [[1 1 1 ] [16 4 1 ] [81 9 1 ]] n=sqrt(m) [[1 1 1] [4 2 1] [9 3 1]]