def mode_in_range(a, axis=0, tol=1E-3):
    """Find the mode of values to within a certain range"""
    a_trunc = a // tol
    vals, counts = mode(a_trunc, axis)
    mask = (a_trunc == vals)
    # mean of each row
    return np.sum(mask, axis) / np.sum(a * mask, axis)
dataset/ETHPy150Open astroML/gatspy/gatspy/periodic/naive_multiband.py/mode_in_range/swapped operands of `/`