A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://numpy.org/devdocs/reference/generated/numpy.imag.html below:

numpy.imag — NumPy v2.4.dev0 Manual

numpy.imag#
numpy.imag(val)[source]#

Return the imaginary part of the complex argument.

Parameters:
valarray_like

Input array.

Returns:
outndarray or scalar

The imaginary component of the complex argument. If val is real, the type of val is used for the output. If val has complex elements, the returned type is float.

Examples

>>> import numpy as np
>>> a = np.array([1+2j, 3+4j, 5+6j])
>>> a.imag
array([2.,  4.,  6.])
>>> a.imag = np.array([8, 10, 12])
>>> a
array([1. +8.j,  3.+10.j,  5.+12.j])
>>> np.imag(1 + 1j)
1.0

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.4