copulas/__init__.py
def check_valid_values(function):
    """Raises an exception if the given values are not supported.

    Args:
        function(callable): Method whose unique argument is a numpy.array-like object.

    Returns:
        callable: Decorated function

    Raises:
        ValueError: If there are missing or invalid values or if the dataset is empty.
    """
    def decorated(self, X, *args, **kwargs):

        if isinstance(X, pd.DataFrame):
            W = X.values

        else:
            W = X

        if not len(W):
            raise ValueError('Your dataset is empty.')

        if W.dtype not in [np.dtype('float64'), np.dtype('int64')]:
            raise ValueError('There are non-numerical values in your data.')

        if np.isnan(W).any().any():
            raise ValueError('There are nan values in your data.')

        return function(self, X, *args, **kwargs)

    return decorated
Raises an exception if the given values are not supported.

    Args:
        function(callable): Method whose unique argument is a numpy.array-like object.

    Returns:
        callable: Decorated function

    Raises:
        ValueError: If there are missing or invalid values or if the dataset is empty.
    
Raises an exception if the given values are not supported.
Raises an exception if the given values are not supported .
def check_valid_values(function):
    def decorated(self, X, *args, **kwargs):
        if isinstance(X, pd.DataFrame):
            W = X.values
        else:
            W = X
        if not len(W):
            raise ValueError('Your dataset is empty.')
        if W.dtype not in [np.dtype('float64'), np.dtype('int64')]:
            raise ValueError('There are non-numerical values in your data.')
        if np.isnan(W).any().any():
            raise ValueError('There are nan values in your data.')
        return function(self, X, *args, **kwargs)
    return decorated
def check_valid_values ( function ) : def decorated ( self , X , * args , ** kwargs ) : if isinstance ( X , pd . DataFrame ) : W = X . values else : W = X if not len ( W ) : raise ValueError ( 'Your dataset is empty.' ) if W . dtype not in [ np . dtype ( 'float64' ) , np . dtype ( 'int64' ) ] : raise ValueError ( 'There are non-numerical values in your data.' ) if np . isnan ( W ) . any ( ) . any ( ) : raise ValueError ( 'There are nan values in your data.' ) return function ( self , X , * args , ** kwargs ) return decorated
Raises an exception if the given values are not supported.
Raises an exception if the given values are not supported .
"""Raises an exception if the given values are not supported.

    Args:
        function(callable): Method whose unique argument is a numpy.array-like object.

    Returns:
        callable: Decorated function

    Raises:
        ValueError: If there are missing or invalid values or if the dataset is empty.
    """
None
callable
If there are missing or invalid values or if the dataset is empty.
If there are missing or invalid values or if the dataset is empty .
ValueError
function
Method whose unique argument is a numpy.array-like object.
Method whose unique argument is a numpy . array - like object .