def _make_skipna_wrapper(alternative, skipna_alternative=None):
if skipna_alternative:<EOL><INDENT>def skipna_wrapper(x):<EOL><INDENT>return skipna_alternative(x.values)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>def skipna_wrapper(x):<EOL><INDENT>nona = x.dropna()<EOL>if len(nona) == <NUM_LIT:0>:<EOL><INDENT>return np.nan<EOL><DEDENT>return alternative(nona)<EOL><DEDENT><DEDENT>return skipna_wrapper<EOL>
Create a function for calling on an array.

    Parameters
    ----------
    alternative : function
        The function to be called on the array with no NaNs.
        Only used when 'skipna_alternative' is None.
    skipna_alternative : function
        The function to be called on the original array

    Returns
    -------
    skipna_wrapper : function