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

Lluís xscript@gmx....
Thu Jun 30 13:27:45 CDT 2011


Matthew Brett writes:
[...]
> I'm afraid, like you, I'm a little lost in the world of masking,
> because I only need the NAs.  I was trying to see if I could come up
> with an API that picked up some of the syntactic convenience of NAs,
> without conflating NAs with IGNOREs.   I guess we need some feedback
> from the 'NA & IGNORE Share the API' (NISA?) proponents to get an idea
> of what we've missed.  @Mark, @Chuck, guys - what have we lost here by
> separating the APIs?

As I tried to convey on my other mail, separating both will force you to
either:

* Make a copy of the array before passing it to another routine (because
  the routine will assign np.NA but you still want the original data)

or

* Tell the other routine whether it should use np.NA or np.IGNORE
  *and* whether it should use "skipna" and/or "propmask".


To me, that's the whole point about a unified API:

* Avoid making array copies.

* Do not add more arguments to *all* routines (to tell them which kind
  of missing data they should produce, and which kind of missing data
  they should ignore/propagate).


Lluis

-- 
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth


More information about the NumPy-Discussion mailing list