Calculates element-wise non-negative square root of the input array.
JAX implementation of numpy.sqrt
.
x (ArrayLike) – input array or scalar.
An array containing the non-negative square root of the elements of x
.
Note
For real-valued negative inputs, jnp.sqrt
produces a nan
output.
For complex-valued negative inputs, jnp.sqrt
produces a complex
output.
Examples
>>> x = jnp.array([-8-6j, 1j, 4]) >>> with jnp.printoptions(precision=3, suppress=True): ... jnp.sqrt(x) Array([1. -3.j , 0.707+0.707j, 2. +0.j ], dtype=complex64) >>> jnp.sqrt(-1) Array(nan, dtype=float32, weak_type=True)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3