

def minmax(X, low, high, minX=None, maxX=None, dtype=np.float):
    X = np.asarray(X)
    if (minX is None):
        minX = np.min(X)
    if (maxX is None):
        maxX = np.max(X)
    X = (X - float(minX))
    X = (X / float((maxX - minX)))
    X = (X * (high - low))
    X = (X + low)
    return np.asarray(X, dtype=dtype)

dataset/ETHPy150Open bytefish/facerec/py/facerec/normalization.py minmax/original