Skip to content

Commit

Permalink
test_imaging_mixins: ignore RuntimeWarning raised by numpy >= 1.24
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasjj committed Dec 19, 2022
1 parent 89bb068 commit f1b385a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lumicks/pylake/tests/test_imaging_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ def test_export_tiff_int(tmp_path):
export_image16.export_tiff(tmp_path / "float16", dtype=np.float16)


@pytest.mark.filterwarnings(
# Numpy 1.24 raises a RuntimeWarning upon overflow during type cast (see call with `clip=True`)
"ignore:overflow encountered in cast:RuntimeWarning:lumicks.pylake.detail.imaging_mixins:48"
)
def test_export_tiff_float(tmp_path):
images = np.ones(shape=(2, 10, 10, 3)) # (n, h, w, c)
export_image32 = tiffexport_factory(images * np.finfo(np.float32).max)
Expand Down

0 comments on commit f1b385a

Please sign in to comment.