<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 16, 2015 at 6:32 PM, Nathaniel Smith <span dir="ltr"><<a href="mailto:njs@pobox.com" target="_blank">njs@pobox.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Apr 16, 2015 at 6:19 PM, Neil Girdhar <<a href="mailto:mistersheik@gmail.com">mistersheik@gmail.com</a>> wrote:<br>
> Actually, looking at the docs, numpy.outer is *only* defined for 1-d<br>
> vectors.  Should anyone who used it with multi-dimensional arrays have an<br>
> expectation that it will keep working in the same way?<br>
<br>
</span>Yes. Generally what we do is more important than what we say we do.<br>
Changing behaviour can break code. Changing docs can change whose<br>
"fault" this is, but broken code is still broken code. And if you put<br>
on your user hat, what do you do when numpy acts weird -- shake your<br>
fist at the heavens and give up, or sigh and update your code to<br>
match? It's pretty common for even undocumented behaviour to still be<br>
depended on.<br>
<br>
Also FWIW, np.outer's docstring says "Input is flattened if not<br>
already 1-dimensional", so we actually did document this.<br>
<span class="im HOEnZb"><br></span></blockquote><div><br></div><div>Ah, yeah, somehow I missed that!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="im HOEnZb">
-n<br>
<br>
--<br>
Nathaniel J. Smith -- <a href="http://vorpus.org" target="_blank">http://vorpus.org</a><br>
</span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</div></div></blockquote></div><br></div></div>