gutils/__init__.py
def validate_glider_args(*args):
    """Validates a glider dataset

    Performs the following changes and checks:
    * Makes sure that there are at least 2 points in the dataset
    * Checks for netCDF4 fill types and changes them to NaNs
    * Tests for finite values in time and depth arrays
    """

    arg_length = len(args[0])

    # Time is assumed to be the first dataset
    if arg_length < 2:
        raise IndexError('The time series must have at least two values')

    # Skipping first (time) argument
    for arg in args[1:]:
        # Make sure all arguments have the same length
        if len(arg) != arg_length:
            raise ValueError('Arguments must all be the same length')

        # Test for finite values
        if len(arg[np.isfinite(arg)]) == 0:
            raise ValueError('Data array has no finite values')
Validates a glider dataset

    Performs the following changes and checks:
    * Makes sure that there are at least 2 points in the dataset
    * Checks for netCDF4 fill types and changes them to NaNs
    * Tests for finite values in time and depth arrays
    
Validates a glider dataset
Performs the following changes and checks:
Makes sure that there are at least 2 points in the dataset
Checks for netCDF4 fill types and changes them to NaNs
Tests for finite values in time and depth arrays
Validates a glider dataset Performs the following changes and checks : Makes sure that there are at least 2 points in the dataset Checks for netCDF4 fill types and changes them to NaNs Tests for finite values in time and depth arrays
def validate_glider_args(*args):
    arg_length = len(args[0])
    if arg_length < 2:
        raise IndexError('The time series must have at least two values')
    for arg in args[1:]:
        if len(arg) != arg_length:
            raise ValueError('Arguments must all be the same length')
        if len(arg[np.isfinite(arg)]) == 0:
            raise ValueError('Data array has no finite values')
def validate_glider_args ( * args ) : arg_length = len ( args [ 0 ] ) if arg_length < 2 : raise IndexError ( 'The time series must have at least two values' ) for arg in args [ 1 : ] : if len ( arg ) != arg_length : raise ValueError ( 'Arguments must all be the same length' ) if len ( arg [ np . isfinite ( arg ) ] ) == 0 : raise ValueError ( 'Data array has no finite values' )
Validates a glider dataset
Performs the following changes and checks:
 Makes sure that there are at least 2 points in the dataset
 Checks for netCDF4 fill types and changes them to NaNs
 Tests for finite values in time and depth arrays
Validates a glider dataset Performs the following changes and checks : Makes sure that there are at least 2 points in the dataset Checks for netCDF4 fill types and changes them to NaNs Tests for finite values in time and depth arrays
"""Validates a glider dataset

    Performs the following changes and checks:
    * Makes sure that there are at least 2 points in the dataset
    * Checks for netCDF4 fill types and changes them to NaNs
    * Tests for finite values in time and depth arrays
    """ # Time is assumed to be the first dataset # Skipping first (time) argument # Make sure all arguments have the same length # Test for finite values