Fix block_reduce doctest

This commit is contained in:
Johannes Schönberger
2013-11-03 09:40:39 +01:00
parent 87dcaa4829
commit c7378614d9
+4 -4
View File
@@ -32,11 +32,11 @@ def block_reduce(image, block_size, func=np.sum, cval=0):
array([[[ 0, 1, 2, 3],
[ 4, 5, 6, 7],
[ 8, 9, 10, 11]],
<BLANKLINE>
[[12, 13, 14, 15],
[16, 17, 18, 19],
[20, 21, 22, 23]],
<BLANKLINE>
[[24, 25, 26, 27],
[28, 29, 30, 31],
[32, 33, 34, 35]]])
@@ -44,9 +44,9 @@ def block_reduce(image, block_size, func=np.sum, cval=0):
array([[[ 16., 17., 18., 19.]]])
>>> block_reduce(image, block_size=(1, 3, 4), func=np.max)
array([[[11]],
<BLANKLINE>
[[23]],
<BLANKLINE>
[[35]]])
>>> block_reduce(image, block_size=(3, 1, 4), func=np.max)
array([[[27],