[Scipy-tickets] [SciPy] #511: (scipyArray).max returns wrong value - depends on order originating arrays are passed into scipy.maximum

SciPy scipy-tickets@scipy....
Mon Oct 8 16:04:54 CDT 2007


#511: (scipyArray).max returns wrong value - depends on order originating arrays
are passed into scipy.maximum
-----------------------+----------------------------------------------------
 Reporter:  tenspd137  |       Owner:  somebody   
     Type:  defect     |      Status:  new        
 Priority:  normal     |   Milestone:  0.7        
Component:  scipy.lib  |     Version:             
 Severity:  normal     |    Keywords:  max,maximum
-----------------------+----------------------------------------------------
 I am creating a 512x512 array that is made up of the maximum values of
 each individual entry from two other 512x512 arrays - ie:

 grad=scipy.maximum(fth1,fth2)

 When I ask for the maximum value of grad (grad.max()), I get 5.7826...  To
 check, fth1.max() returns 6.434... and fth2.max() returns .5031...  Thus,
 5.7826 can't be right.  Then, just interested, I get an array of numbers
 when I try:

 scipy.where(fth2>fth2.max())

 which also can't be right - there should be no locations greater than the
 maximum in an array.

 Next, I try:

 grad=scipy.maximum(fth2,fth1) and grad.max() returns 6.434... as expected.

 This looks like a bug - different answers based on the order arrays are
 passed in as well as the {array}.max() method returning the correct value.

 I am new to scipy, so I apologize if this is the wrong place (if so, could
 you tell me where the right one is?)  Also, if more detailed code is
 necessary, please feel free to ask - I would like to help fix this if need
 be.  Otherwise, if I am using this wrong, could you please tell me how to
 correctly do this?  Thank you - my email is dcday137@cableone.net

-- 
Ticket URL: <http://scipy.org/scipy/scipy/ticket/511>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list