def linscale(d, lim):
    """ utility function to linearly scale array d to the interval defined by lim """
    return (d - d.min())*(lim[0] - lim[1]) + lim[0]
dataset/ETHPy150Open pybrain/pybrain/pybrain/utilities.py/linscale/swapped operands of `-`