[SciPy-user] maximum_filter1d size parameter
Rick Giuly
rgiuly at gmail.com
Sun Mar 8 03:22:18 EDT 2009
Hello All,
It seems I'm not understanding the "size" parameter for
maximum_filter1d. The documentation says size is the "length along which
to calculate 1D maximum"
Starting with this array:
>>> a
array([[1, 2, 3],
[4, 1, 1],
[1, 6, 7]])
Because there are 3 rows in the matrix, it seems to me that with size
set to 3, the result of the filter would be:
array([[4, 6, 7],
[4, 6, 7],
[4, 6, 7]])
But the result is this:
>>> maximum_filter1d(a, 3, axis=0)
array([[4, 2, 3],
[4, 6, 7],
[4, 6, 7]])
I don't see why.
Any help is appreciated.
-rick
More information about the SciPy-User
mailing list