From 8f41212f4f0e68bc5f2bb4ac3c70990ac332afc0 Mon Sep 17 00:00:00 2001 From: Darius Couchard Date: Fri, 21 Jun 2024 09:47:51 +0200 Subject: [PATCH] Attempting fixing tests --- tests/test_openeo_gfmap/test_feature_extractors.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/test_openeo_gfmap/test_feature_extractors.py b/tests/test_openeo_gfmap/test_feature_extractors.py index 16cf657..b283dcf 100644 --- a/tests/test_openeo_gfmap/test_feature_extractors.py +++ b/tests/test_openeo_gfmap/test_feature_extractors.py @@ -221,11 +221,13 @@ def test_latlon_extractor(backend: Backend): def test_patch_feature_local(): input_path = Path(__file__).parent / "resources/test_optical_cube.nc" - inds = xr.open_dataset(input_path).to_array(dim="bands") - - inds = inds.sel( - bands=[band for band in inds.bands.to_numpy() if band != "crs"] - ).transpose("bands", "t", "y", "x") + inds = ( + xr.open_dataset(input_path) + .to_array(dim="bands") + .drop_sel(bands="crs") + .transpose("bands", "t", "y", "x") + .astype("uint16") + ) features = apply_feature_extractor_local( DummyPatchExtractor, inds, parameters={"GEO-EPSG": 32631}