From 49f3621fef8cb5042e84bf007640bcaaf1d57980 Mon Sep 17 00:00:00 2001 From: lukas Date: Fri, 1 Dec 2023 13:13:28 +0100 Subject: [PATCH] fixed failed test (changed sign of offset) --- tests/core/test_raster_collection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/core/test_raster_collection.py b/tests/core/test_raster_collection.py index 060615e..a03afd6 100644 --- a/tests/core/test_raster_collection.py +++ b/tests/core/test_raster_collection.py @@ -136,7 +136,7 @@ def test_scale(): ones = np.ones((100,100), dtype='uint16') band_name_ones = 'ones' scale = 100 - offset = 2 + offset = -2 handler.add_band( Band, band_name=band_name_ones, @@ -150,7 +150,7 @@ def test_scale(): before_scaling = handler.get_values() handler.scale(inplace=True) after_scaling = handler.get_values() - assert (after_scaling == scale * before_scaling - offset).all(), 'values not scaled correctly' + assert (after_scaling == scale * before_scaling + offset).all(), 'values not scaled correctly' assert (after_scaling == 98).all(), 'wrong value after scaling'