sqrt
Description
Return the non-negative square root of an array, element-wise. That is,
.
Mandatory Input Parameters
Parameter |
Type |
Description |
|---|---|---|
x |
array_like |
Input array or scalar |
Optional Input Parameters
Return Value
Type |
Description |
|---|---|
ndarray/scalar |
An array of the same shape as x, containing the positive square root of each element in x. |
Examples
>>> import numpy as np >>> np.sqrt(4) 2.0 >>> >>> x = np.array([2.25, 6.25, 25]) >>> np.sqrt(x) array([1.5, 2.5, 5. ]) >>>
Parent topic: Basic Operation Functions