<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Apr 11, 2016 at 5:24 PM Chris Barker <<a href="mailto:chris.barker@noaa.gov">chris.barker@noaa.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Apr 8, 2016 at 4:37 PM, Ian Henriksen <span dir="ltr"><<a href="mailto:insertinterestingnamehere@gmail.com" target="_blank">insertinterestingnamehere@gmail.com</a>></span> wrote:<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>If we introduced the T2 syntax, this would be valid:</div><div><br></div><div>a @ b.T2</div><div><br></div><div>It makes the intent much clearer. </div></div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>would:</div><div><br></div><div>a @ colvector(b)</div><div><br></div><div>work too? or is T2  generalized to more than one column? (though I suppose colvector() could support more than one column also -- weird though that might be.)</div><div><br></div><div>-CHB</div></div></div></div></blockquote><div><br></div><div>Right, so I've opted to withdraw my support for having the T2 syntax prepend</div><div>dimensions when the array has fewer than two dimensions. Erroring out in the 1D</div><div>case addresses my concerns well enough. The colvec/rowvec idea seems nice</div><div>too, but it matters a bit less to me, so I'll leave that discussion open for others to</div><div>follow up on. Having T2 be a broadcasting transpose is a bit more general than any</div><div>semantics for rowvec/colvec that I can think of. Here are specific arrays that, in</div><div>the a @ b.T2 can only be handled using some sort of transpose:</div><div><br></div><div>a = np.random.rand(2, 3, 4)</div><div>b = np.random.rand(2, 1, 3, 4)</div><div><br></div><div>Using these inputs, the expression</div><div><br></div><div>a @ b.T2</div><div><br></div><div>would have the shape (2, 2, 3, 3).</div><div><br></div><div>All the T2 property would be doing is a transpose that has similar broadcasting</div><div>semantics to matmul, solve, inv, and the other gufuncs. The primary difference</div><div>with those other functions is that transposes would be done as views whereas the</div><div>other operations, because of the computations they perform, all have to return new</div><div>output arrays.</div><div><br></div><div>Hope this helps,</div><div><br></div><div>-Ian Henriksen</div></div></div>