Skip to content

Commit

Permalink
fixed failed test (changed sign of offset)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasValentin committed Dec 1, 2023
1 parent 4b175c3 commit 49f3621
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/core/test_raster_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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'


Expand Down

0 comments on commit 49f3621

Please sign in to comment.