mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-02 13:58:01 +08:00
TST: add test for resizing 2D image with a 3D output shape
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user