[Numpy-discussion] Arguments silently ignored (kwargs) in meshgrid etc.

Michael McNeil Forbes michael.forbes+python at gmail.com
Thu May 29 19:49:58 EDT 2014


On May 29, 2014, at 3:16 PM, Michael McNeil Forbes <michael.forbes+python at gmail.com> wrote:
> On May 29, 2014, at 1:41 AM, Ralf Gommers <ralf.gommers at gmail.com> wrote:
>> On Thu, May 29, 2014 at 5:35 AM, Michael McNeil Forbes <michael.forbes+python at gmail.com> wrote:
>>> I just noticed that meshgrid() silently ignore extra arguments.  It just burned me (I forgot that it is meshgrid(indexing='ij') and tried meshgrid(indices='ij') which subtly broke my code.)
>> 
>> That's not very user-friendly, a check should be added. Do you want to send a PR for that?
> 
> Okay.  Working on it.

See PR 4758: 

https://github.com/numpy/numpy/pull/4758

> Question: Would be be okay to implement this in terms of a private (or public) function, something like:
> 
> def _sparsegrid(xi, sparse=True, indexing='ij', copy=True):  ...

or maybe "opengrid()"?  (This is not included in the PR for technical reasons, I will open another if it is considered desirable)

Michael. 




More information about the NumPy-Discussion mailing list