[Numpy-discussion] fromnumeric.py internal calls

Stephan Hoyer shoyer at gmail.com
Mon Feb 29 02:44:30 EST 2016


I think this is an improvement, but I do wonder if there are libraries out
there that use *args instead of **kwargs to handle these extra arguments.
Perhaps it's worth testing this change against third party array libraries
that implement their own array like classes? Off the top of my head, maybe
scipy, pandas, dask, astropy, pint, xarray?
On Wed, Feb 24, 2016 at 3:40 AM G Young <gfyoung17 at gmail.com> wrote:

> Hello all,
>
> I have PR #7325 <https://github.com/numpy/numpy/pull/7325/files> up that
> changes the internal calls for functions in *fromnumeric.py* from
> positional arguments to keyword arguments.  I made this change for two
> reasons:
>
> 1) It is consistent with the external function signature
> 2)
>
> The inconsistency caused a breakage in *pandas* in its own implementation
> of *searchsorted* in which the *sorter* argument is not really used but
> is accepted so as to make it easier for *numpy* users who may be used to
> the *searchsorted* signature in *numpy*.
>
> The standard in *pandas* is to "swallow" those unused arguments into a
> *kwargs* argument so that we don't have to document an argument that we
> don't really use.  However, that turned out not to be possible when
> *searchsorted* is called from the *numpy* library.
>
> Does anyone have any objections to the changes I made?
>
> Thanks!
>
> Greg
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> https://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20160229/3120c30e/attachment.html>


More information about the NumPy-Discussion mailing list