def iscomplexobj(x: ndarray | npt.NDArray[Any]) -> bool:
    """

    Check for a complex type or an array of complex numbers.

    The type of the input is checked, not the value. Even if the input
    has an imaginary part equal to zero, `iscomplexobj` evaluates to True.

    Parameters
    ----------
    x : any
        The input can be of any type and shape.

    Returns
    -------
    iscomplexobj : bool
        The return value, True if `x` is of a complex type or has at least
        one complex element.

    See Also
    --------
    numpy.iscomplexobj

    Availability
    --------
    Multiple GPUs, Multiple CPUs
    """
    if isinstance(x, ndarray):
        return x.dtype.kind == "c"
    else:
        return np.iscomplexobj(x)


    Check for a complex type or an array of complex numbers.

    The type of the input is checked, not the value. Even if the input
    has an imaginary part equal to zero, `iscomplexobj` evaluates to True.

    Parameters
    ----------
    x : any
        The input can be of any type and shape.

    Returns
    -------
    iscomplexobj : bool
        The return value, True if `x` is of a complex type or has at least
        one complex element.

    See Also
    --------
    numpy.iscomplexobj

    Availability
    --------
    Multiple GPUs, Multiple CPUs
    
cupynumeric/_module/logic_array_type.py