Perpendis Array tools
Royalty tools Sign in

Array tools › Blog

Bit-exactness & reproducibility guides

Field notes on comparing floating-point outputs down to the last bit — finding where two arrays first diverge, reading ULP distance, and telling normal rounding from a real bug. The free diff tool does the same work in your browser, nothing uploaded.

ONNX vs PyTorch output mismatch: divergence and tolerance

An ONNX vs PyTorch output mismatch is usually rounding, not a bug. How to find the first divergent element, read the ULP gap, and set a sane atol/rtol.

Compare two NumPy arrays and find the exact first difference

How to compare two NumPy arrays: array_equal vs allclose vs isclose, find where they first differ, and measure the gap in ULPs rather than guesswork.

How to diff two .npy files (and see the exact first difference)

Diff npy files the right way: check dtype and shape first, test bit-exact vs tolerant equality, and pinpoint the exact first differing index.

np.allclose Not Equal to Tolerance: Fixing rtol/atol Failures

np.allclose not equal to tolerance? Decode the assert_allclose rtol/atol error, understand the defaults gotcha, and pick a tolerance from your own data.