[SciPy-user] maximum_filter1d size parameter
Sun Mar 8 20:27:38 CDT 2009
On Sun, Mar 8, 2009 at 8:12 PM, Rick Giuly <email@example.com> wrote:
> Zach and Josef, thank you both for the suggestions. I believe a.max(0)
> is what I really wanted.
> What I'm trying to do is make a "maximum image" from two images (The new
> image should have the maximum from the two input images at every pixel).
> If I stack two 2D images (forming a 3D array) I figure I can use max(0)
> to get what I want. If there is a better way to do this, please let me
I usually use numpy.max but in the help file there is also
numpy.maximum(x1, x2[, out])
Element-wise maximum of array elements.
Compare two arrays and returns a new array containing the element-wise maxima
this would save you the stack operation, and thinking about axis argument.
More information about the SciPy-user