GCXS.real

property GCXS.real

The real part of the array.

Examples

>>> from sparse import COO
>>> x = COO.from_numpy([1 + 0j, 0 + 1j])
>>> x.real.todense()  
array([1., 0.])
>>> x.real.dtype
dtype('float64')
Returns

out – The real component of the array elements. If the array dtype is real, the dtype of the array is used for the output. If the array is complex, the output dtype is float.

Return type

SparseArray

See also

numpy.ndarray.real

NumPy equivalent attribute.

numpy.real

NumPy equivalent function.