[Numpy-tickets] [NumPy] #465: ndarray's mean method should be computed using double precision

NumPy numpy-tickets@scipy....
Sat Mar 31 16:12:03 CDT 2007


#465: ndarray's mean method should be computed using double precision
------------------------+---------------------------------------------------
 Reporter:  chanley     |        Owner:  somebody     
     Type:  defect      |       Status:  closed       
 Priority:  normal      |    Milestone:  1.0.2 Release
Component:  numpy.core  |      Version:  devel        
 Severity:  normal      |   Resolution:  wontfix      
 Keywords:              |  
------------------------+---------------------------------------------------
Changes (by oliphant):

  * status:  new => closed
  * resolution:  => wontfix

Comment:

 The problem with this becomes more clear when reducing over a single axis.
 If you have a 2-d float32 array and compute the mean over one of the axes
 you obtain a 1-d array.  It should be of float32 type.  If the accumulator
 is done with a different data-type, then by default you will end up with a
 float64 array, which is not what many people will expect.

 I would like to avoid guessing what the user wants, because it makes the
 system harder to explain and requires a lot of "special-case" checking
 which also makes the system harder to maintain.  If users want a higher-
 precision accumulator they can get it.

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/465#comment:2>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list