TST: add test for resizing 2D image with a 3D output shape

This commit is contained in:
Gregory R. Lee
2015-07-08 15:54:38 -04:00
parent 9e9c65b97c
commit 48622ca179
+12
View File
@@ -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)