hloopy/preprocess.py
def average_points(arr, d):
    """Average every `d` points together. This creates a new array so
    be careful if using on a large dataset.

    Args:
        arr (ndarray-like): Array to be operated on.
        d (int): Number of points to average together. Must divide array 
                 evenly otherwise unexpected results could occur, or a raise
                 depending on the type of array passed.
    """
    return np.array(list(arr[i:i+d].mean() for i in range(0, len(arr), d)))
Average every `d` points together. This creates a new array so
    be careful if using on a large dataset.

    Args:
        arr (ndarray-like): Array to be operated on.
        d (int): Number of points to average together. Must divide array 
                 evenly otherwise unexpected results could occur, or a raise
                 depending on the type of array passed.
    
Average every `d` points together. This creates a new array so
be careful if using on a large dataset.
Average every ` d ` points together . This creates a new array so be careful if using on a large dataset .
def average_points(arr, d):
    return np.array(list(arr[i:i+d].mean() for i in range(0, len(arr), d)))
def average_points ( arr , d ) : return np . array ( list ( arr [ i : i + d ] . mean ( ) for i in range ( 0 , len ( arr ) , d ) ) )
Average every `d` points together.
Average every ` d ` points together .
"""Average every `d` points together. This creates a new array so
    be careful if using on a large dataset.

    Args:
        arr (ndarray-like): Array to be operated on.
        d (int): Number of points to average together. Must divide array 
                 evenly otherwise unexpected results could occur, or a raise
                 depending on the type of array passed.
    """
arr
Array to be operated on.
Array to be operated on .
d
Number of points to average together. Must divide array
evenly otherwise unexpected results could occur, or a raise
depending on the type of array passed.
Number of points to average together . Must divide array evenly otherwise unexpected results could occur or a raise depending on the type of array passed .