Another interesting thing is that the order also seems to matter, as the results are different when this is executed (at least in my setup):
if __name__ == '__main__':
    print(avg_time(30, 75))
    print(avg_time(30, 3))
    print(avg_time(30, 0))
    print(avg_time(5, 75))
    print(avg_time(5, 3))
    print(avg_time(5, 0))

Would you mind creating an issue on GitHub so that we could track and check it?