jax.numpy.cbrt#
- jax.numpy.cbrt(x, /)[來源]#
計算輸入陣列的元素級立方根。
numpy.cbrt
的 JAX 實作。- 參數:
x (ArrayLike) – 輸入陣列或純量。
complex
dtype 不受支援。- 回傳:
包含
x
元素立方根的陣列。- 回傳型別:
另請參閱
jax.numpy.sqrt()
:計算輸入的元素級非負平方根。jax.numpy.square()
:計算輸入的元素級平方。
範例
>>> x = jnp.array([[216, 125, 64], ... [-27, -8, -1]]) >>> with jnp.printoptions(precision=3, suppress=True): ... jnp.cbrt(x) Array([[ 6., 5., 4.], [-3., -2., -1.]], dtype=float32)