[NumPy-Tickets] [NumPy] #1180: numpy.average: add an option to skip 'None' values from count

NumPy Trac numpy-tickets@scipy....
Thu Mar 24 18:17:28 CDT 2011


#1180: numpy.average: add an option to skip 'None' values from count
--------------------------+-------------------------------------------------
  Reporter:  dalloliogm   |       Owner:  somebody   
      Type:  enhancement  |      Status:  closed     
  Priority:  normal       |   Milestone:  Unscheduled
 Component:  Other        |     Version:             
Resolution:  wontfix      |    Keywords:             
--------------------------+-------------------------------------------------
Changes (by mwiebe):

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


Comment:

 I think Python list comprehensions offer a better syntax then an
 'ignore_None' flag would provide. See:

 {{{
 In [44]: a = [1, None, 2, None]

 In [45]: [x for x in a if x != None]
 Out[45]: [1, 2]

 In [46]: numpy.average([x for x in a if x != None])
 Out[46]: 1.5
 }}}

 Closing as wontfix.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1180#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list