A RetroSearch Logo

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

Search Query:

Showing content from https://docs.scipy.org/doc/numpy/reference/generated/numpy.angle.html below:

numpy.angle — NumPy v2.3 Manual

numpy.angle#
numpy.angle(z, deg=False)[source]#

Return the angle of the complex argument.

Parameters:
zarray_like

A complex number or sequence of complex numbers.

degbool, optional

Return angle in degrees if True, radians if False (default).

Returns:
anglendarray or scalar

The counterclockwise angle from the positive real axis on the complex plane in the range (-pi, pi], with dtype as numpy.float64.

Notes

This function passes the imaginary and real parts of the argument to arctan2 to compute the result; consequently, it follows the convention of arctan2 when the magnitude of the argument is zero. See example.

Examples

>>> import numpy as np
>>> np.angle([1.0, 1.0j, 1+1j])               # in radians
array([ 0.        ,  1.57079633,  0.78539816]) # may vary
>>> np.angle(1+1j, deg=True)                  # in degrees
45.0
>>> np.angle([0., -0., complex(0., -0.), complex(-0., -0.)])  # convention
array([ 0.        ,  3.14159265, -0.        , -3.14159265])

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