Please use `np.issubdtype(x.dtype, np.complexfloating)`.