[Numpy-tickets] [NumPy] #961: Masked array getdata() and getmask() resolve to get_data() and get_mask() in docs

NumPy numpy-tickets@scipy....
Fri Nov 28 01:10:35 CST 2008


#961: Masked array getdata() and getmask() resolve to  get_data() and get_mask()
in docs
---------------------------+------------------------------------------------
 Reporter:  ScottSinclair  |       Owner:  pierregm
     Type:  defect         |      Status:  new     
 Priority:  normal         |   Milestone:  1.3.0   
Component:  numpy.ma       |     Version:  none    
 Severity:  normal         |    Keywords:          
---------------------------+------------------------------------------------
 The getdata() and getmask() functions in the numpy.ma module resolve to
 get_data() and get_mask().

 {{{
 >>> import numpy.ma as ma
 >>> ma.getdata
 <function get_data at 0xb7514e2c>
 >>> ma.getmask
 <function get_mask at 0xb665f3e4>
 }}}

 getmask() and getdata() are exposed in the top level namespace numpy.ma,
 while
 get_data() and get_mask() are only available under numpy.ma.core.

 {{{
 >>> ma.get_mask
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 AttributeError: 'module' object has no attribute 'get_mask'
 >>> ma.core.get_mask
 <function get_mask at 0xb665f3e4>
 >>> ma.get_data
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 AttributeError: 'module' object has no attribute 'get_data'
 >>> ma.core.get_data
 <function get_data at 0xb7514e2c>
 }}}

 This is an issue in the documentation effort since the documentation for
 getmask/getdata will link to the ma.core functions get_mask/get_data.
 There
 is no easy way to resolve this in the documentation. Therefore, since
 this can be confusing to users and is easily fixed in a backward
 compatible
 way that doesn't break Numpy, I suggest that the attached patch against
 r6116
 be applied.

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


More information about the Numpy-tickets mailing list