mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-01 15:28:01 +08:00
Test that output argument is utilized.
This commit is contained in:
@@ -54,5 +54,14 @@ def test_selem_overflow():
|
||||
testing.assert_array_equal(binary_res, grey_res)
|
||||
|
||||
|
||||
def test_out_argument():
|
||||
for func in (binary.binary_erosion, binary.binary_dilation):
|
||||
strel = np.ones((3, 3), dtype=np.uint8)
|
||||
img = np.ones((10, 10))
|
||||
out = np.zeros_like(img)
|
||||
out_saved = out.copy()
|
||||
func(img, strel, out=out)
|
||||
testing.assert_(np.any(out != out_saved))
|
||||
|
||||
if __name__ == '__main__':
|
||||
testing.run_module_suite()
|
||||
|
||||
Reference in New Issue
Block a user