numpy.ndarray.real#
attribute
- ndarray.real#
The real part of the array.
Usually returns a view into the original array, but returns elementwise
.realfor arrays of objects.See also
numpy.realequivalent function
Examples
>>> import numpy as np >>> x = np.sqrt([1+0j, 0+1j]) >>> x.real array([ 1. , 0.70710678]) >>> x.real.dtype dtype('float64')