[Numpy-discussion] Should ndarray subclasses support the keepdims arg?

Nathaniel Smith njs at pobox.com
Tue May 5 16:39:13 EDT 2015

On May 5, 2015 11:05 AM, "Neil Girdhar" <mistersheik at gmail.com> wrote:
> Maybe they should have written their code with **kwargs that consumes all
keyword arguments rather than assuming that no keyword arguments would be
added?  The problem with this approach in general is that it makes writing
code unnecessarily convoluted.

If the user asked for keepdims=True, then silently ignoring this is worse
than raising an error.

And I guess I would call this making code necessarily convoluted :-). There
are not that many options for evolving an interface shared by multiple
unrelated libraries.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150505/90609997/attachment.html>

More information about the NumPy-Discussion mailing list