From 86ad1c427206aaf1a93de09cf903caaae13a1b5a Mon Sep 17 00:00:00 2001 From: Gregor Lenz Date: Wed, 10 Jul 2024 15:18:06 -0600 Subject: [PATCH] change np.product to np.prod --- test/test_tonic_utils.py | 4 ++-- tonic/utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_tonic_utils.py b/test/test_tonic_utils.py index a5b15d19..efcf45c6 100644 --- a/test/test_tonic_utils.py +++ b/test/test_tonic_utils.py @@ -47,13 +47,13 @@ def test_pytorch_batch_collation_dense_tensor(): assert batch.shape[2] == sensor_size[2] -@pytest.mark.skipif(not platform == "linux", reason="Test doesn't finish on Windows.") +@pytest.mark.skipif(platform == "win32", reason="Test doesn't finish on Windows.") def test_plotting(): events, sensor_size = create_random_input() tonic.utils.plot_event_grid(events) -@pytest.mark.skipif(not platform == "linux", reason="Test doesn't finish on Windows.") +@pytest.mark.skipif(platform == "win32", reason="Test doesn't finish on Windows.") def test_animation(): events, sensor_size = create_random_input() diff --git a/tonic/utils.py b/tonic/utils.py index 9f4c91b1..959b1416 100644 --- a/tonic/utils.py +++ b/tonic/utils.py @@ -42,7 +42,7 @@ def plot_event_grid( sensor_size = (sensor_size_x, sensor_size_y, sensor_size_p) transform = transforms.ToFrame( - sensor_size=sensor_size, n_time_bins=np.product(axis_array) + sensor_size=sensor_size, n_time_bins=np.prod(axis_array) ) frames = transform(events)