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

Nathaniel Smith njs at pobox.com
Thu Apr 16 18:44:13 EDT 2015

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 :-)


Nathaniel J. Smith -- http://vorpus.org

More information about the NumPy-Discussion mailing list