def _remove_nans(*variables):
    'Remove NaNs from arrays that cause issues with calculations.\n\n    Takes a variable number of arguments\n    Returns masked arrays in the same order as provided\n    '
    mask = None
    for v in variables:
        if (mask is None):
            mask = np.isnan(v)
        else:
            mask |= np.isnan(v)
    ret = []
    for v in variables:
        ret.append(v[(~ mask)])
    return ret
Remove NaNs from arrays that cause issues with calculations.

Takes a variable number of arguments
Returns masked arrays in the same order as provided
def _remove_nans(*variables):
    'Remove NaNs from arrays that cause issues with calculations.\n\n    Takes a variable number of arguments\n    Returns masked arrays in the same order as provided\n    '
    mask = None
    for v in variables:
        if (mask is None):
            mask = np.isnan(v)
        else:
            mask |= np.isnan(v)
    ret = []
    for v in variables:
        ret.append(v[(~ mask)])
    return ret