arraypad: allow padding with zero entries (i.e. no padding).

This commit is contained in:
Jostein Bø Fløystad
2013-07-05 14:29:09 +02:00
parent 24c0c40977
commit 794a4d7dae
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -518,5 +518,12 @@ def test_pad_one_axis_three_ways():
**kwargs)
def test_zero_pad_width():
arr = np.arange(30)
arr = np.reshape(arr, (6, 5))
for pad_width in (0, (0, 0), ((0, 0), (0, 0))):
assert np.all(arr == pad(arr, pad_width, mode='constant'))
if __name__ == "__main__":
run_module_suite()