From d5b8e178a015e2f597bc3255a61d1ef5c514af37 Mon Sep 17 00:00:00 2001 From: Anthero1 Date: Tue, 9 Apr 2024 10:53:52 -0400 Subject: [PATCH] Updated tests for xray view --- test/unit/test_visualization.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/test_visualization.py b/test/unit/test_visualization.py index d2d7a4e6e..db63354c3 100644 --- a/test/unit/test_visualization.py +++ b/test/unit/test_visualization.py @@ -23,7 +23,7 @@ def test_sem_y(self): def test_xray_y(self): xray = ps.visualization.xray(self.im, axis=1) - assert np.sum(xray) == np.sum(~self.im) + assert np.min(xray) >= 0 and np.max(xray) <= 1 def test_sem_z(self): sem = ps.visualization.sem(self.im, axis=2) @@ -31,7 +31,7 @@ def test_sem_z(self): def test_xray_z(self): xray = ps.visualization.xray(self.im, axis=2) - assert np.sum(xray) == np.sum(~self.im) + assert np.min(xray) >= 0 and np.max(xray) <= 1 def test_imshow_single(self): im = ps.generators.blobs(shape=[10, 20, 30])