jax.numpy.imag
Contents
jax.numpy.imag#
- jax.numpy.imag(val,/)[source]#
Return element-wise imaginary of part of the complex argument.
JAX implementation of
numpy.imag.- Parameters:
val (ArrayLike) – input array or scalar.
- Returns:
An array containing the imaginary part of the elements of
val.- Return type:
See also
jax.numpy.conjugate()andjax.numpy.conj(): Returns the element-wisecomplex-conjugate of the input.jax.numpy.real(): Returns the element-wise real part of the complexargument.
Examples
>>>jnp.imag(4)Array(0, dtype=int32, weak_type=True)>>>jnp.imag(5j)Array(5., dtype=float32, weak_type=True)>>>x=jnp.array([2+3j,5-1j,-3])>>>jnp.imag(x)Array([ 3., -1., 0.], dtype=float32)
Contents
