You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
___________________________________ test_reproject_with_extra_dims[dims4] ___________________________________
dims = {'band': 5, 'extra': 2, 'time': 10, 'x': 20, ...}
@pytest.mark.parametrize('dims', [
{'y': 20, 'x': 20, 'time': 10, 'band': 5},
{'x': 20, 'y': 20, 'time': 10, 'band': 5},
{'time': 10, 'band': 5, 'x': 20, 'y': 20},
{'time': 10, 'x': 20, 'band': 5, 'y': 20},
{'y': 20, 'x': 20, 'time': 10, 'band': 5, 'extra': 2}
])
def test_reproject_with_extra_dims(dims):
crs1 = _parse_crs('+init=epsg:4326')
crs2 = _parse_crs('+init=epsg:3395')
ds = generate_test_dataset(
dims=dims, crs=crs1
)
proj = Reprojection(crs=crs2)
reprojected = proj.apply(ds)
# Check that a reprojected slice of the dataset is the same as
# the slice of the reprojection of the entire dataset.
slices = [
{'band': 3},
{'time': slice(1, 3)}
]
for s in slices:
xr_assert_equal(
proj.apply(ds.isel(**s)),
> reprojected.isel(**s)
)
E AssertionError: Left and right Dataset objects are not equal
E
E
E Differing data variables:
E L C12__im (time, extra, y, x) float64 -0.4385 0.295 0.5144 ... 0.0594 -0.1833
E R C12__im (time, y, x, extra) float64 -0.4385 0.7736 ... -0.1302 -0.1833
E L C12__re (time, extra, y, x) float64 0.5077 0.1089 0.2545 ... 0.6105 0.2276
E R C12__re (time, y, x, extra) float64 0.5077 0.1572 0.1089 ... -0.51 0.2276
E L C22 (time, extra, y, x) float64 -0.1661 -1.155 ... -0.6713 -0.06515
E R C22 (time, y, x, extra) float64 -0.1661 -0.3903 ... 0.1816 -0.06515
E L C11 (time, extra, y, x) float64 -0.6673 0.6047 -0.325 ... 0.5696 0.1056
E R C11 (time, y, x, extra) float64 -0.6673 0.03727 ... 0.01081 0.1056
nd/tests/test_warp.py:535: AssertionError
The text was updated successfully, but these errors were encountered:
test_reproject_with_extra_dims
sometimes fails:The text was updated successfully, but these errors were encountered: