Records of a numpy recarray (or ndarray with structured dtype)
    that do not appear in another.

    Fast routine for determining which records in numpy array `X`
    do not appear in numpy recarray `Y`.

    Record array version of func:`tabular.fast.arraydifference`.

    **Parameters**

            **X** :  numpy recarray

                    Numpy recarray to comapare to numpy recarray `Y`.
                    Return subset of `X` corresponding to elements not in `Y`.

            **Y** :  numpy recarray

                    Numpy recarray to which numpy recarray `X` is compared.
                    Return subset of `X` corresponding to elements not in `Y`.

    **Returns**

            **Z** :  numpy recarray

                    Subset of `X` corresponding to elements not in `Y`.

    **See Also:**

            :func:`tabular.fast.arraydifference`, :func:`tabular.fast.recarrayisin`

def recarraydifference(X,Y):
    """
    Records of a numpy recarray (or ndarray with structured dtype)
    that do not appear in another.

    Fast routine for determining which records in numpy array `X`
    do not appear in numpy recarray `Y`.

    Record array version of func:`tabular.fast.arraydifference`.

    **Parameters**

            **X** :  numpy recarray

                    Numpy recarray to comapare to numpy recarray `Y`.
                    Return subset of `X` corresponding to elements not in `Y`.

            **Y** :  numpy recarray

                    Numpy recarray to which numpy recarray `X` is compared.
                    Return subset of `X` corresponding to elements not in `Y`.

    **Returns**

            **Z** :  numpy recarray

                    Subset of `X` corresponding to elements not in `Y`.

    **See Also:**

            :func:`tabular.fast.arraydifference`, :func:`tabular.fast.recarrayisin`

    """
    if len(Y) > 0:
        Z = recarrayisin(X,Y)
        return X[np.invert(Z)]
    else:
        return X