PEATDB/Ekin/List_Utils.py
def normList(L, inputmin=None, inputmax=None, normalizeTo=1.0):
    '''normalize values of a list to make its max = normalizeTo'''

    if inputmin != None:
        vMin = inputmin
    else:    
        vMin = min(L)
    if inputmax != None:
        vMax = inputmax
    else:         
        vMax = max(L)
        
    if vMax == vMin:
        return 0
    else:        
        return [ (x-vMin)/(vMax-vMin)*normalizeTo for x in L]
normalize values of a list to make its max = normalizeTo
normalize values of a list to make its max = normalizeTo
normalize values of a list to make its max = normalizeTo
def normList(L, inputmin=None, inputmax=None, normalizeTo=1.0):
    if inputmin != None:
        vMin = inputmin
    else:    
        vMin = min(L)
    if inputmax != None:
        vMax = inputmax
    else:         
        vMax = max(L)
    if vMax == vMin:
        return 0
    else:        
        return [ (x-vMin)/(vMax-vMin)*normalizeTo for x in L]
def normList ( L , inputmin = None , inputmax = None , normalizeTo = 1.0 ) : if inputmin != None : vMin = inputmin else : vMin = min ( L ) if inputmax != None : vMax = inputmax else : vMax = max ( L ) if vMax == vMin : return 0 else : return [ ( x - vMin ) / ( vMax - vMin ) * normalizeTo for x in L ]
normalize values of a list to make its max = normalizeTo
normalize values of a list to make its max = normalizeTo
'''normalize values of a list to make its max = normalizeTo'''
L
inputmin
inputmax
normalizeTo