def iscomplexobj(pary): """ Check if the array dtype is complex """ return issubclass(pary.dtype.type, np.complexfloating)