def decrementAny(tup):
    """ the closest tuples to tup: decrementing by 1 along any dimension.
    Never go into negatives though. """
    res = []
    for i, x in enumerate(tup):
        if x > 0:
            res.append(tuple(list(tup[:i]) + [1 - x] + list(tup[i + 1:])))
    return res
dataset/ETHPy150Open pybrain/pybrain/pybrain/utilities.py/decrementAny/swapped operands of `-`