[Numpy-discussion] Arguments silently ignored (kwargs) in meshgrid etc.
ralf.gommers at gmail.com
Thu May 29 04:41:01 EDT 2014
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?
Is this intentional? I don't see why `meshgrid` does not have explicit
> arguments. If this is not a design decision, I will open an issue and PR.
That was forced by backwards compatibility when meshgrid was extended to
>2-D. The old signature was ``meshgrid(x, y)``, so changing it to
``meshgrid(xn, indexing='ij', sparse=...)`` with xn a tuple of arrays was
not possible. This was done in PR 192.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion