def same_dist_elems(arr):
    """
    Smart little script to check if indices are equidistant. 
    Found at https://stackoverflow.com/questions/58741961/how-to-check-if-consecutive-elements-of-array-are-evenly-spaced
    
    Parameters
    ----------
    arr : array_like
        Input array
        
    Returns
    -------
    bool
        boolean value, True if array is equidistantly spaced, False otherwise
    """
    diff = arr[1] - arr[0]
    for x in range(1, len(arr) - 1):
        if arr[x + 1] - arr[x] != diff:
            return False
    return True