Skip to content

Commit

Permalink
run pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sevcikp committed Jan 9, 2025
1 parent bcba03d commit c679a45
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions test/test_io_raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,17 +409,13 @@ def test_resample_from_array():
# not keep 2D
in_data = (np.ones(in_tile.shape[1:]),)
out_tile = BufferedTilePyramid("geodetic").tile(6, 10, 10)
out_array = resample_from_array(in_data, in_tile.affine, out_tile, keep_2d=False)
out_array = resample_from_array(in_data, in_tile.affine, out_tile, keep_2d=False)
assert out_array.shape == (1, 256, 256)
# Test ma.MaskedArray input
in_data = (
ma.MaskedArray(
data=np.ones(in_tile.shape[1:])
),
)
in_data = (ma.MaskedArray(data=np.ones(in_tile.shape[1:])),)
out_tile = BufferedTilePyramid("geodetic").tile(6, 10, 10)
out_array = resample_from_array(in_data, in_tile.affine, out_tile)
assert out_array.shape == (1, 256, 256)
out_array = resample_from_array(in_data, in_tile.affine, out_tile)
assert out_array.shape == (1, 256, 256)
# errors
with pytest.raises(TypeError):
in_data = "invalid_type"
Expand Down

0 comments on commit c679a45

Please sign in to comment.