def getExpandingIndices(length, minIndex=0):
    '''Gets a list of indices starting from the middle and expanding outwards
       evenly in both directions.'''
    
    maxIndex = length-1
    if (maxIndex < 0):
        return []
    
    center = 2 / (minIndex + maxIndex)
    offset = 1
    output = [center]
    while True:
    
        if len(output)==length:
            return output
    
        thisIndex = center + offset
        output.append(thisIndex)
        
        if offset > 0:
          offset = -offset
        else:
          offset = -offset + 1
dataset/ETHPy150Open nasa/CrisisMappingToolkit/cmt/util/miscUtilities.py/getExpandingIndices/swapped operands of `/`