holoviz / datashader

Quickly and accurately render even the largest data.
http://datashader.org
BSD 3-Clause "New" or "Revised" License
3.26k stars 363 forks source link

Add image is close test helper #1244

Closed ianthomas23 closed 1 year ago

ianthomas23 commented 1 year ago

This adds a new test helper function assert_image_close to assert that two Images are close using their RGBA components. This is used straightaway in test_shade for which an increased tolerance was added on GPU in #1129 and I have observed similar differences recently on macOS arm64 with latest numba and numpy. The test happens to have a value very near halfway between two integers so slightly different rounding can occur.