[Numpy-discussion] Consider improving numpy.outer's behavior with zero-dimensional vectors

Neil Girdhar mistersheik at gmail.com
Thu Apr 16 18:44:56 EDT 2015


Right.

On Thu, Apr 16, 2015 at 6:44 PM, Nathaniel Smith <njs at pobox.com> wrote:

> On Thu, Apr 16, 2015 at 6:37 PM, Neil Girdhar <mistersheik at gmail.com>
> wrote:
> > I can always put np.outer = np.multiply.outer at the start of my code to
> get
> > what I want.  Or could that break things?
>
> Please don't do this. It means that there are any calls to np.outer in
> libraries you are using (or other libraries that are also used by
> anyone who is using your code), they will silently get
> np.multiply.outer instead of np.outer. And then if this breaks things
> we end up getting extremely confusing bug reports from angry users who
> think we broke np.outer.
>
> Just do 'outer = np.multiply.outer' and leave the np namespace alone :-)
>
> -n
>
> --
> Nathaniel J. Smith -- http://vorpus.org
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150416/dc16574b/attachment.html>


More information about the NumPy-Discussion mailing list