def isnan(data):
    """Performs an element-wise check to determine if the NDArray contains a NaN element
    or not.


    Parameters
    ----------
    input : NDArray
        An N-D NDArray.

    Returns
    -------
    output: NDArray
        The output NDarray, with same shape as input, where 1 indicates the array element is
        NaN i.e. Not a Number and 0 otherwise.

    Examples
    --------
    >>> data = mx.nd.array([np.nan, -1])
    >>> output = mx.nd.contrib.isnan(data)
    >>> output
    [1. 0.]
    <NDArray 2 @cpu(0)>
    """
    return data != data
