qp.math.is_complex_dtype

is_complex_dtype(obj)[source]

Return whether an object’s data type is complex-valued.

Parameters:

obj (tensor_like) – Object whose data type is checked.

Returns:

Whether the object’s data type is complex-valued.

Return type:

bool

>>> x = np.array([1.0, 2.0])
>>> qp.math.is_complex_dtype(x)
False
>>> x = np.array([1.0j, 2.0j])
>>> qp.math.is_complex_dtype(x)
True