import numpy as np def test_close(allclose): x = np.linspace(-1, 1) y = x + 0.001 assert allclose(y, x, atol=0.002) assert not allclose(y, x, atol=0.0005) ...
確定! 回上一頁