Hello Marten,

I was suggesting not changing the shape at all, since dot/matmul/solve do the 
right thing already in such a case.

In my proposal, only for ndim >=2 do we switch the last two dimensions.

Ilhan is right that adding a special case for ndim=1 (error) adds programmer 
overhead, which is against the general philosophy of NumPy I feel.

Get Outlook for iOS<https://aka.ms/o0ukef>

________________________________
From: NumPy-Discussion 
<numpy-discussion-bounces+einstein.edison=gmail....@python.org> on behalf of 
Marten van Kerkwijk <m.h.vankerkw...@gmail.com>
Sent: Monday, June 24, 2019 3:24 PM
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] Syntax Improvement for Array Transpose

Dear Hameer, Ilhan,

Just to be sure: for a 1-d array, you'd both consider `.T` giving a shape of 
`(n, 1)` the right behaviour? I.e., it should still change from what it is now 
- which is to leave the shape at `(n,)`.

Your argument about `dot` and `matmul` having similar behaviour certainly adds 
weight (but then, as I wrote before, my opinion on this changes by the second, 
so I'm very happy to defer to others who have a clearer sense of what is the 
right thing to do here!).

I think my main worry now is how to get to be able to use a new state without 
having to wait 4..6 releases...

All the best,

Marten
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to