TST: Unit test to check for 3d unwrap seg fault

Added a unit test to check for bug in unwrap_phase which causes
a segmentation fault when the middle dimension is connected.
This commit is contained in:
Jonathan Helmus
2014-11-06 21:03:14 -06:00
parent 4fc6f8b064
commit 25653dc288
+7
View File
@@ -144,5 +144,12 @@ def test_invalid_input():
assert_raises(ValueError, unwrap_phase, np.zeros((1, 1)), 'False')
def test_unwrap_3d_middle_wrap_around():
# Segmentation fault in 3D unwrap phase with middle dimension connected
# GitHub issue #1171
image = np.zeros((20, 30, 40), dtype=np.float32)
unwrap = unwrap_phase(image, wrap_around=[False, True, False])
assert np.all(unwrap == 0)
if __name__ == "__main__":
run_module_suite()