diff --git a/skimage/transform/tests/test_warps.py b/skimage/transform/tests/test_warps.py index 4de59359..12754d5a 100644 --- a/skimage/transform/tests/test_warps.py +++ b/skimage/transform/tests/test_warps.py @@ -181,6 +181,18 @@ def test_resize3d_resize(): assert_almost_equal(resized, ref) + +def test_resize3d_2din_3dout(): + # 3D output with 2D input + x = np.zeros((5, 5), dtype=np.double) + x[1, 1] = 1 + resized = resize(x, (10, 10, 1), order=0) + ref = np.zeros((10, 10, 1)) + ref[2:4, 2:4] = 1 + assert_almost_equal(resized, ref) + + + def test_resize3d_bilinear(): # bilinear 3rd dimension x = np.zeros((5, 5, 2), dtype=np.double)