def average_cycles(arr, numcycles):
    """For cyclical data, split into cyles and then average the cycles 
    together. This is for data where signal averaging is desired.

    Args:
        arr (ndarray): Array to be operated on.
        numcycles: Number of cycles in the total array. The array must divide
                   evenly by this number, otherwise a call to reshape() will
                   raise.
    
    Returns:
        The signal averaged ndarray.
    """
    N = len(arr)
    cyclen = N/numcycles
    return arr.reshape(numcycles, cyclen).mean(axis=0)