MCPcopy Create free account
hub / github.com/numpy/numpy / imag

Function imag

numpy/array_api/_elementwise_functions.py:381–389  ·  view source on GitHub ↗

Array API compatible wrapper for :py:func:`np.imag `. See its docstring for more information.

(x: Array, /)

Source from the content-addressed store, hash-verified

379
380
381def imag(x: Array, /) -> Array:
382 """
383 Array API compatible wrapper for :py:func:`np.imag <numpy.imag>`.
384
385 See its docstring for more information.
386 """
387 if x.dtype not in _complex_floating_dtypes:
388 raise TypeError("Only complex floating-point dtypes are allowed in imag")
389 return Array._new(np.imag(x))
390
391
392def isfinite(x: Array, /) -> Array:

Callers

nothing calls this directly

Calls 2

_newMethod · 0.80
imagMethod · 0.80

Tested by

no test coverage detected