Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-26 Thread Ralf Gommers
On Thu, Jun 27, 2019 at 4:19 AM Ilhan Polat wrote: > I've finally gone through the old discussion and finally got the > counter-argument in one of the Dag Sverre's replies > http://numpy-discussion.10968.n7.nabble.com/add-H-attribute-tp34474p34668.html > > TL; DR > > I disagree with [...adding th

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-26 Thread Ilhan Polat
I've finally gone through the old discussion and finally got the counter-argument in one of the Dag Sverre's replies http://numpy-discussion.10968.n7.nabble.com/add-H-attribute-tp34474p34668.html TL; DR I disagree with [...adding the .H attribute...] being forward looking, as > it explicitly crea

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-26 Thread Charles R Harris
On Wed, Jun 26, 2019 at 2:18 PM Ralf Gommers wrote: > > > On Wed, Jun 26, 2019 at 10:04 PM Kirill Balunov > wrote: > >> Only concerns #4 from Ilhan's list. >> >> ср, 26 июн. 2019 г. в 00:01, Ralf Gommers : >> >>> >>> [] >>> >>> Perhaps not full consensus between the many people with differen

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-26 Thread Ralf Gommers
On Wed, Jun 26, 2019 at 11:24 PM Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > Hi Ralf, > > I realize you feel strongly that this whole thread is rehashing history, > The .H part was. But Cameron volunteered to work on a solution that satisfies all concerns. but I think it is worth p

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-26 Thread Sebastian Berg
On Wed, 2019-06-26 at 17:22 -0400, Marten van Kerkwijk wrote: > Hi Ralf, > > I realize you feel strongly that this whole thread is rehashing > history, but I think it is worth pointing out that many seem to > consider that the criterion for allowing backward incompatible > changes, i.e., that "exi

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-26 Thread Marten van Kerkwijk
Hi Ralf, I realize you feel strongly that this whole thread is rehashing history, but I think it is worth pointing out that many seem to consider that the criterion for allowing backward incompatible changes, i.e., that "existing code is buggy or is consistently confusing many users", is actually

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-26 Thread Ralf Gommers
On Wed, Jun 26, 2019 at 10:24 PM Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > > The main motivation for the @ PEP was actually to be able to get rid of >> objects like np.matrix and scipy.sparse matrices that redefine the meaning >> of the * operator. Quote: "This PEP proposes the min

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-26 Thread Marten van Kerkwijk
> The main motivation for the @ PEP was actually to be able to get rid of > objects like np.matrix and scipy.sparse matrices that redefine the meaning > of the * operator. Quote: "This PEP proposes the minimum effective change > to Python syntax that will allow us to drain this swamp [meaning np.ma

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-26 Thread Ralf Gommers
On Wed, Jun 26, 2019 at 10:04 PM Kirill Balunov wrote: > Only concerns #4 from Ilhan's list. > > ср, 26 июн. 2019 г. в 00:01, Ralf Gommers : > >> >> [] >> >> Perhaps not full consensus between the many people with different >> opinions and interests. But for the first one, arr.T change: it's

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-26 Thread Kirill Balunov
Only concerns #4 from Ilhan's list. ср, 26 июн. 2019 г. в 00:01, Ralf Gommers : > > [] > > Perhaps not full consensus between the many people with different opinions > and interests. But for the first one, arr.T change: it's clear that this > won't happen. > To begin with, I must admit that

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-26 Thread Ralf Gommers
On Wed, Jun 26, 2019 at 6:32 PM Cameron Blocker wrote: > A previous discussion of adding a .H operator on the mailing list can be > found here: > http://numpy-discussion.10968.n7.nabble.com/add-H-attribute-td34474.html > that thread refers to an earlier discussion at > http://thread.gmane.org/gma

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-26 Thread Cameron Blocker
A previous discussion of adding a .H operator on the mailing list can be found here: http://numpy-discussion.10968.n7.nabble.com/add-H-attribute-td34474.html that thread refers to an earlier discussion at http://thread.gmane.org/gmane.comp.python.numeric.general/6637 but that link was broken for me

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-26 Thread Andras Deak
Dear Ilhan, Thanks for writing these up. I feel that from a usability standpoint most people would support #3 (.H/.mH), especially considering Marten's very good argument about @. Having to wrap your transposed matrices in function calls half defeats the purpose of being able to write stacked matr

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-26 Thread Ilhan Polat
Maybe a bit of a grouping would help, because I am also losing track here. Let's see if I could manage to get something sensible because, just like Marten mentioned, I am confusing myself even when I am thinking about this 1- Transpose operation on 1D arrays: This is a well-known confusion poi

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Ralf Gommers
On Wed, Jun 26, 2019 at 3:56 AM Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > Hi Ralf, > > On Tue, Jun 25, 2019 at 6:31 PM Ralf Gommers > wrote: > >> >> >> On Tue, Jun 25, 2019 at 11:02 PM Marten van Kerkwijk < >> m.h.vankerkw...@gmail.com> wrote: >> >>> >>> For the names, my suggesti

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Marten van Kerkwijk
Hi Ralf, On Tue, Jun 25, 2019 at 6:31 PM Ralf Gommers wrote: > > > On Tue, Jun 25, 2019 at 11:02 PM Marten van Kerkwijk < > m.h.vankerkw...@gmail.com> wrote: > >> >> For the names, my suggestion of lower-casing the M in the initial one, >> i.e., `.mT` and `.mH`, so far seemed most supported (and

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Ralf Gommers
On Tue, Jun 25, 2019 at 11:02 PM Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > > For the names, my suggestion of lower-casing the M in the initial one, > i.e., `.mT` and `.mH`, so far seemed most supported (and I think we should > discuss *assuming* those would eventually involve not c

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Eric Wieser
One other approach here that perhaps treads a little too close to np.matrix: class MatrixOpWrapper: def __init__(self, arr): # todo: accept axis arguments here? self._array = arr # todo: assert that arr.ndim >= 2 / call atleast1d @property def T(self): return linalg.t

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Sebastian Berg
On Tue, 2019-06-25 at 17:00 -0400, Marten van Kerkwijk wrote: > Hi Kirill, others, > > Indeed, it is becoming long! That said, while initially I was quite > charmed by Eric's suggestion of deprecating and then changing `.T`, I > think the well-argued opposition to it has changed my opinion. > Perh

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Marten van Kerkwijk
Hi Kirill, others, Indeed, it is becoming long! That said, while initially I was quite charmed by Eric's suggestion of deprecating and then changing `.T`, I think the well-argued opposition to it has changed my opinion. Perhaps most persuasive to me was Matthew's point just now that code (or a cod

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Ralf Gommers
On Tue, Jun 25, 2019 at 10:17 PM Kirill Balunov wrote: > > вт, 25 июн. 2019 г. в 21:20, Cameron Blocker : > >> It seems to me that the general consensus is that we shouldn't be >> changing .T to do what we've termed matrix transpose or conjugate >> transpose. >> > > Reading through this thread, I

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Kirill Balunov
вт, 25 июн. 2019 г. в 21:20, Cameron Blocker : > It seems to me that the general consensus is that we shouldn't be changing > .T to do what we've termed matrix transpose or conjugate transpose. > Reading through this thread, I can not say that I have the same opinion - at first, many looked posit

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Matthew Brett
Hi, On Tue, Jun 25, 2019 at 10:57 AM Stephan Hoyer [snip] ... > I also agree with Alan that probably it's too late to change the behavior of > .T for arrays with more than 2-dimensions. NumPy could certainly use a more > comprehensive policy around backwards compatibility, but we certainly need

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Sebastian Berg
On Tue, 2019-06-25 at 14:18 -0400, Cameron Blocker wrote: > It seems to me that the general consensus is that we shouldn't be > changing .T to do what we've termed matrix transpose or conjugate > transpose. As such, the discussion of whether .T should be changed to > throw errors or warnings on 1D

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Cameron Blocker
It seems to me that the general consensus is that we shouldn't be changing .T to do what we've termed matrix transpose or conjugate transpose. As such, the discussion of whether .T should be changed to throw errors or warnings on 1D arrays seems a bit off topic (not that it shouldn't be discussed).

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Stephan Hoyer
On Tue, Jun 25, 2019 at 10:14 AM Todd wrote: > On Tue, Jun 25, 2019 at 11:47 AM Alan Isaac wrote: > >> On 6/25/2019 11:03 AM, Todd wrote: >> > Fair enough. But although there are valid reasons to do a divide by >> zero, it still causes a warning because it is a problem often enough that >> peop

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Todd
I was saying we shouldn't change the default transpose operation to be conjugate transpose. We don't currently have a conjugate transpose so it isn't an issue. I think having a conjugate transpose is a great idea, I just don't think it should be the default. On Tue, Jun 25, 2019 at 12:12 PM Ilha

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Todd
On Tue, Jun 25, 2019 at 11:47 AM Alan Isaac wrote: > On 6/25/2019 11:03 AM, Todd wrote: > > Fair enough. But although there are valid reasons to do a divide by > zero, it still causes a warning because it is a problem often enough that > people should be made aware of it. I > > think this is a

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Ilhan Polat
I think we would have seen a lot of evidence in the last four decades if this was that problematic. You are the second person to memtion these bugs. Care to show me some examples of these bugs? Maybe I am missing the point here. I haven't seen any bugs because somebody thought they are just trans

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Alan Isaac
On 6/25/2019 11:03 AM, Todd wrote: Fair enough.  But although there are valid reasons to do a divide by zero, it still causes a warning because it is a problem often enough that people should be made aware of it.  I think this is a similar scenario. I side with Stephan on this, but when there

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Todd
On Tue, Jun 25, 2019 at 10:42 AM Stephan Hoyer wrote: > On Tue, Jun 25, 2019 at 7:20 AM Todd wrote: > >> On Tue, Jun 25, 2019 at 9:35 AM Juan Nunez-Iglesias >> wrote: >> >>> On Mon, 24 Jun 2019, at 11:25 PM, Marten van Kerkwijk wrote: >>> >>> Just to be sure: for a 1-d array, you'd both conside

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Alan Isaac
I wish this discussion would be clearer that a.T is not going anywhere, should not change, and in any case should match a.transpose(). Anything else threatens to break existing code for no good payoff. How many people in this discussion are proposing that a widely used library like numpy should m

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Stephan Hoyer
On Tue, Jun 25, 2019 at 7:20 AM Todd wrote: > On Tue, Jun 25, 2019 at 9:35 AM Juan Nunez-Iglesias > wrote: > >> On Mon, 24 Jun 2019, at 11:25 PM, Marten van Kerkwijk wrote: >> >> 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., i

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Todd
On Tue, Jun 25, 2019 at 9:35 AM Juan Nunez-Iglesias wrote: > On Mon, 24 Jun 2019, at 11:25 PM, Marten van Kerkwijk wrote: > > 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

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Todd
That is how it is in your field, but not mine. For us we only use the conventional transpose, even for complex numbers. And I routinely see bugs in MATLAB because of its choice of defaults, and there are probably many more that don't get caught because they happen silently. I think the principle

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Marten van Kerkwijk
Hi Juan, On Tue, Jun 25, 2019 at 9:35 AM Juan Nunez-Iglesias wrote: > On Mon, 24 Jun 2019, at 11:25 PM, Marten van Kerkwijk wrote: > > 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 -

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Juan Nunez-Iglesias
On Mon, 24 Jun 2019, at 11:25 PM, Marten van Kerkwijk wrote: > 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,)`. Just to chime in as a user: v.T

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Marten van Kerkwijk
Hi All, The examples with different notation brought back memory of another solution: define `m.ᵀ` and m.ᴴ`. This is possible, since python3 allows any unicode for names, nicely readable, but admittedly a bit annoying to enter (in emacs, set-input-method to TeX and then ^T, ^H). More seriously, s

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Andras Deak
On Tue, Jun 25, 2019 at 1:03 PM Ilhan Polat wrote: > > I have to disagree, I hardly ever saw such bugs I know the exact behaviour of MATLAB isn't very relevant for this discussion, but anyway the reason I think this is a problem in MATLAB is that there are a bunch of confused questions on Stack

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Ilhan Polat
I have to disagree, I hardly ever saw such bugs and moreover is not compatible if you don't also transpose it but expected in almost all contexts of matrices, vectors and scalars. Elementwise conjugation is well inline with other elementwise operations starting with a dot in matlab hence still con

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-25 Thread Andras Deak
On Tue, Jun 25, 2019 at 4:29 AM Cameron Blocker wrote: > > In my opinion, the matrix transpose operator and the conjugate transpose > operator should be one and the same. Something nice about both Julia and > MATLAB is that it takes more keystrokes to do a regular transpose instead of > a conju

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-24 Thread Cameron Blocker
I would love for there to be .H property. I have .conj().T in almost every math function that I write so that it will be general enough for complex numbers. Besides being less readable, what puts me in a bind is trying to accommodate LinearOperator/LinearMap like duck type objects in place of matr

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-24 Thread Ilhan Polat
I think enumerating the cases along the way makes it a bit more tangible for the discussion import numpy as np z = 1+1j z.conjugate() # 1-1j zz = np.array(z) zz # array(1+1j) zz.T # array(1+1j) # OK expected. zz.conj() # 1-1j ?? what happened; no arrays? zz.conjugate() # 1-1j ?? same zz1d

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-24 Thread Marten van Kerkwijk
Hi Stephan, Yes, the complex conjugate dtype would make things a lot faster, but I don't quite see why we would wait for that with introducing the `.H` property. I do agree that `.H` is the correct name, giving most immediate clarity (i.e., people who know what conjugate transpose is, will recogn

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-24 Thread Stephan Hoyer
On Mon, Jun 24, 2019 at 8:10 AM Todd wrote: > On Mon, Jun 24, 2019 at 11:00 AM Stephan Hoyer wrote: > >> On Sun, Jun 23, 2019 at 10:05 PM Stewart Clelland < >> stewartclell...@gmail.com> wrote: >> >>> Hi All, >>> >>> Based on discussion with Marten on github >>>

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-24 Thread Alan Isaac
Iirc, that works only on (2-d) matrices. Cheers, Alan Isaac On 6/24/2019 10:45 AM, Todd wrote: I think the corresponding MATLAB function/operation is this: https://www.mathworks.com/help/matlab/ref/transpose.html ___ NumPy-Discussion mailing list N

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-24 Thread Todd
On Mon, Jun 24, 2019 at 11:00 AM Stephan Hoyer wrote: > On Sun, Jun 23, 2019 at 10:05 PM Stewart Clelland < > stewartclell...@gmail.com> wrote: > >> Hi All, >> >> Based on discussion with Marten on github >> , I have a couple of >> suggestions on synta

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-24 Thread Stephan Hoyer
On Sun, Jun 23, 2019 at 10:05 PM Stewart Clelland wrote: > Hi All, > > Based on discussion with Marten on github > , I have a couple of > suggestions on syntax improvements on array transpose operations. > > First, introducing a shorthand for the Hermi

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-24 Thread Todd
I think the corresponding MATLAB function/operation is this: https://www.mathworks.com/help/matlab/ref/transpose.html On Mon, Jun 24, 2019, 10:33 Alan Isaac wrote: > Points of reference: > Mathematica: https://reference.wolfram.com/language/ref/Transpose.html > Matlab: https://www.mathworks.co

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-24 Thread Alan Isaac
Points of reference: Mathematica: https://reference.wolfram.com/language/ref/Transpose.html Matlab: https://www.mathworks.com/help/matlab/ref/permute.html Personally I would find any divergence between a.T and a.transpose() to be rather surprising. Cheers, Alan Isaac

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-24 Thread Todd
o:* 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

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-24 Thread Hameer Abbasi
n] 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 `

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-24 Thread Marten van Kerkwijk
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 w

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-24 Thread Hameer Abbasi
: Re: [Numpy-discussion] Syntax Improvement for Array Transpose Please don't introduce more errors for 1D arrays. They are already very counter-intuitive for transposition and for other details not relevant to this issue. Emitting errors for such a basic operation is very bad for

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-24 Thread Ilhan Polat
Please don't introduce more errors for 1D arrays. They are already very counter-intuitive for transposition and for other details not relevant to this issue. Emitting errors for such a basic operation is very bad for user experience. This already is the case with wildly changing slicing syntax. It

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-23 Thread Marten van Kerkwijk
I had not looked at any implementation (only remembered the nice idea of "importing from the future"), and looking at the links Eric shared, it seems that the only way this would work is, effectively, pre-compilation doing a `.replace('.T', '._T_from_the_future')`, where you'd be hoping that there

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-23 Thread Eric Wieser
gt; > > > However, we will need some way to filter for intent, as the > > > people > > > > who write this code are the ones who didn’t read docs on it at > > > the > > > > time, and so there might be a fair amount of noise even if it > > > fi

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-23 Thread Sebastian Berg
e applications > > I > > > have seen so far. > > > > > > Get Outlook for iOS > > > > > > From: NumPy-Discussion < > > > numpy-discussion-bounces+einstein.edison=gmail@python.org> on > > > behalf of Eric Wiese

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-23 Thread Sebastian Berg
On Sun, 2019-06-23 at 23:03 +0200, Andras Deak wrote: > On Sun, Jun 23, 2019 at 10:37 PM Sebastian Berg > wrote: > > Yeah, likely worth a short. I doubt many uses for the n-dimensional > > axis transpose, so maybe a futurewarning approach can work. If not, > > I > > suppose the solution is the dep

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-23 Thread Marten van Kerkwijk
n < > > numpy-discussion-bounces+einstein.edison=gmail@python.org> on > > behalf of Eric Wieser > > Sent: Sunday, June 23, 2019 9:24 PM > > To: Discussion of Numerical Python > > Subject: Re: [Numpy-discussion] Syntax Improvement for Array > > Transpos

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-23 Thread Andras Deak
On Sun, Jun 23, 2019 at 10:37 PM Sebastian Berg wrote: > Yeah, likely worth a short. I doubt many uses for the n-dimensional > axis transpose, so maybe a futurewarning approach can work. If not, I > suppose the solution is the deprecation for ndim != 2. Any chance that the n-dimensional transpose

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-23 Thread Sebastian Berg
ssion of Numerical Python > Subject: Re: [Numpy-discussion] Syntax Improvement for Array > Transpose > > This might be contentious, but I wonder if, with a long enough > deprecation cycle, we can change the meaning of .T. That would look > like: > > * Emit a future warning on `more_

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-23 Thread Hameer Abbasi
sion on behalf of Eric Wieser Sent: Sunday, June 23, 2019 9:24 PM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Syntax Improvement for Array Transpose This might be contentious, but I wonder if, with a long enough deprecation cycle, we can change the meaning of .T. That w

Re: [Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-23 Thread Eric Wieser
This might be contentious, but I wonder if, with a long enough deprecation cycle, we can change the meaning of .T. That would look like: * Emit a future warning on `more_than_2d.T` with a message like "in future .T will transpose just the last two dimensions, not all dimensions. Use are.transpose(

[Numpy-discussion] Syntax Improvement for Array Transpose

2019-06-23 Thread Stewart Clelland
Hi All, Based on discussion with Marten on github , I have a couple of suggestions on syntax improvements on array transpose operations. First, introducing a shorthand for the Hermitian Transpose operator. I thought "A.HT" might be a viable candidate.