On Tue, Apr 24, 2012 at 2:43 PM, Pierre Haessig
<pierre.haes...@crans.org> wrote:
> If the idea of having two payloads is to avoid a maximum of "skipna &
> friends" extra keywords, I would like it much. My feeling with my small
> experience with R is that I end up calling every function with a
> different magical set of keywords (na.rm, na.action, ... and I forgot).

While I can't in general defend R on consistency grounds, there is a
logic to this particular case.

Most basic R functions like 'sum' take the na.rm= argument, which can
be True or False and is equivalent to the skipna argument we've talked
about for ufuncs. The functions that take other arguments (like
na.action= for model fitting functions, or use= for their equivalent
of np.corrcoef) are the ones that have *more* than 2 ways to handle
NAs. E.g. model fitting functions given NAs can raise an error, skip
the NA cases, or pass the NA cases through, and the correlation matrix
function has different options for what to do with cases where one
column has an NA but there are two others that don't.

Having a distinction between missing and ignored values doesn't really
affect whether you need such options. (If anything I guess it could
make such options even more complicated -- what if I want my
regression function to error out on missing but skip over ignored
values, etc.)

- N
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to