isreal(x)
If element has complex type with zero complex part, the return value for that element is True.
isreal
may behave unexpectedly for string or object arrays (see examples)
Input array.
Returns a bool array, where True if input element is real.
isrealobj
Return True if x is not a complex type.
>>> a = np.array([1+1j, 1+0j, 4.5, 3, 2, 2j], dtype=complex)
... np.isreal(a) array([False, True, True, True, True, False])
The function does not work on string arrays.
>>> a = np.array([2j, "a"], dtype="U")
... np.isreal(a) # Warns about non-elementwise comparison False
Returns True for all elements in input array of dtype=object
even if any of the elements is complex.
>>> a = np.array([1, "2", 3+4j], dtype=object)
... np.isreal(a) array([ True, True, True])
isreal should not be used with object arrays
>>> a = np.array([1+2j, 2+1j], dtype=object)See :
... np.isreal(a) array([ True, True])
The following pages refer to to this document either explicitly or contain code examples using this.
numpy.isreal
numpy.isrealobj
numpy.iscomplex
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them