[Numpy-discussion] alterNEP - was: missing data discussion round 2

Gary Strangman strang at nmr.mgh.harvard.edu
Thu Jun 30 20:38:04 EDT 2011


>>> It seems to me, that what ``func`` should do, if it wants you to be
>>> able to unmask the NAs, is to make a masked array view of ``arr``, and
>>> return that.   And indeed the simplicity of the separated API
>>> immediately makes that clear - in my view at least.
>>
>> I agree on this example. My only concern is on the API's ability to
>> foresee as most future use-cases as possible, without impacting
>> performance.
>
> But, of course, there's a great danger in trying to cover every
> possible use-case.
>
> My argument is that the kind of cases that you are describe are - I
> believe - very rare and are even a little difficult to make up.  Is
> that fair?
>
> To my mind, the separate NA and IGNORE API is easier to understand and
> explain.   If that isn't true, please do say, and say why - because
> that point is key.
>
> If it is true that the separate API is clearer, then the benefit in
> terms of power and extensibility has to be large, in order to go for
> the fused API.

For what it's worth, I wholeheartedly agree with Matthew here. Being able 
to designate NA separately from IGNORE has tremendous conceptual clarity, 
at least for me. Not only are these are completely separate mental 
constructs in my head, but they even arise from completely different 
sources: NAs arise from my subjects whims, my experimental procedures, my 
research personnel, or bad equipment days, whereas IGNORE generally comes 
from me and my analysis or visualization needs.

While I bet it's possible for an exceedingly clever person to fuse the two 
(I doubt my brain could pull that off), I fear that in the end I would 
have to go to the documentation every time in order to use either one. 
Thus, I agree that fusing into a single API needs to have a very large 
benefit. I admit I haven't followed all steps here, but I sense there is 
indeed numpy-coder-level benefit to fusing. However I, like Matthew (I 
believe), don't see appreciable benefits at the user level, /plus/ the 
risk of user confusion ...

-best
Gary


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


More information about the NumPy-Discussion mailing list