<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 08-Feb-15 5:47 PM, Nathaniel Smith
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAPJVwBkr5LFhqkhjQMcAWvVwmh08DeyRdx4sf7c_w5Y2BDjDtA@mail.gmail.com"
      type="cite">
      <pre wrap="">On 8 Feb 2015 13:39, "Simon Wood" <a class="moz-txt-link-rfc2396E" href="mailto:sgwoodjr@gmail.com"><sgwoodjr@gmail.com></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">
I find the broadcasting aspect of Numpy a turn off. If I go to add a 1x3
</pre>
      </blockquote>
      <pre wrap="">vector to a 3x1 vector, I want the program to warn me or error out. I don't
want it to do something under the covers that has no mathematical basis or
definition. Also, Octave may provide a warning, but Matlab errors
out..."Matrix dimensions must agree". Which they must, at least in my world.

There may be another matlab/numpy idiom clash here that's affecting this:
in MATLAB, vectors are always 1 x n or n x 1, because of the matrix focused
history. In numpy the idiomatic thing to do is to make vectors
one-dimensional, and then this confusion cannot arise. Indeed, the only
cases I'm thinking of where I even create a 3x1 or 1x3 vector in the first
place are when I'm about to do something clever with broadcasting.

-n

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
NumPy-Discussion mailing list
<a class="moz-txt-link-abbreviated" href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a>
<a class="moz-txt-link-freetext" href="http://mail.scipy.org/mailman/listinfo/numpy-discussion">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a>
</pre>
    </blockquote>
    Perhaps more attention needs to be given to the Matrix class, which
    has it's weaknesses.<br>
    <br>
    Colin W.<br>
  </body>
</html>