[Scipy-tickets] [SciPy] #1355: not sufficient documentation of amax

SciPy Trac scipy-tickets@scipy....
Wed Jan 12 07:41:04 CST 2011

#1355: not sufficient documentation of amax
 Reporter:  bubla        |       Owner:  somebody
     Type:  enhancement  |      Status:  new     
 Priority:  normal       |   Milestone:  0.9.0   
Component:  Other        |     Version:  0.8.0   
 Keywords:               |  
 Hello, the result of amax function is not described very well for
 multidimensional arrays.
 Consider this:

 import scipy as sp

 a = sp.arange(27).reshape((3,3,3))
 sp.amax(a, 2)

 The result is actually a 2D array
 array([[ 2,  5,  8],
        [11, 14, 17],
        [20, 23, 26]])
 but when one says that amax computes "maximum along an axis", one would
 expect maybe a 1D array, in this case maybe
 array([8, 17, 26])
 and the actual result could be the result of a (hypotetical) call
 sp.amax(a, [2, 0])
 because it computes maximums along axis 0 from a slice a[:, :, z] for
 every z, is that right?

 So I think that the function should get a proper docstring, I don't think
 that changing its behavior is reasible even if I get it right (which I am
 not 100% sure).

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

More information about the Scipy-tickets mailing list