[Numpy-tickets] [NumPy] #948: Incorrect shape after basic arithmetic involving masked objects

NumPy numpy-tickets@scipy....
Mon Nov 3 23:06:19 CST 2008


#948: Incorrect shape after basic arithmetic involving masked objects
----------------------+-----------------------------------------------------
 Reporter:  dharland  |       Owner:  somebody
     Type:  defect    |      Status:  new     
 Priority:  normal    |   Milestone:  1.2.2   
Component:  Other     |     Version:  none    
 Severity:  normal    |    Keywords:  ma      
----------------------+-----------------------------------------------------
 Adding ma.masked to an array of size 1 may change its shape.

 {{{
 a = ma.arange(10)
 print (a[1:2] + 1).shape
   --> (1,)
 print (a[1:2] + ma.masked).shape
   --> ()  # INCORRECT, should be (1,)
 }}}

 Possible patch attached.

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


More information about the Numpy-tickets mailing list