Re: [Numpy-discussion] add .H attribute?

2013-07-13 Thread Alan G Isaac
On 7/13/2013 1:46 PM, Nathaniel Smith wrote: > Why not just write > > def H(a): > return a.conj().T > > in your local namespace? > First of all, I am sympathetic to being conservative about the addition of attributes! But the question about adding a.H about the possibility of improving - spe

Re: [Numpy-discussion] add .H attribute?

2013-07-13 Thread Pauli Virtanen
13.07.2013 20:46, Nathaniel Smith kirjoitti: [clip] > Why not just write > > def H(a): > return a.conj().T In long expressions, this puts H to the wrong side. -- Pauli Virtanen ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://m

Re: [Numpy-discussion] add .H attribute?

2013-07-13 Thread Nathaniel Smith
On 13 Jul 2013 16:30, "Alan G Isaac" wrote: > > > On Sun, Jul 7, 2013 at 9:28 AM, Alan G Isaac > wrote: > > I miss being able to spell a.conj().T as a.H, as one can > > with numpy matrices. > > > On 7/7/2013 4:49 PM, Charles R Harris wrote: > > There was a long thread about this back around 1.1 or

Re: [Numpy-discussion] add .H attribute?

2013-07-13 Thread Alan G Isaac
> On Sun, Jul 7, 2013 at 9:28 AM, Alan G Isaac > wrote: > I miss being able to spell a.conj().T as a.H, as one can > with numpy matrices. On 7/7/2013 4:49 PM, Charles R Harris wrote: > There was a long thread about this back around 1.1 or so, > long time ago in any c

Re: [Numpy-discussion] Allow == and != to raise errors

2013-07-13 Thread josef . pktd
On Sat, Jul 13, 2013 at 9:14 AM, Nathaniel Smith wrote: > On Fri, Jul 12, 2013 at 2:13 PM, Benjamin Root wrote: >> I can see where you are getting at, but I would have to disagree. First of >> all, when a comparison between two mis-shaped arrays occur, you get back a >> bone fide python boolean,

Re: [Numpy-discussion] Allow == and != to raise errors

2013-07-13 Thread Nathaniel Smith
On Fri, Jul 12, 2013 at 2:13 PM, Benjamin Root wrote: > I can see where you are getting at, but I would have to disagree. First of > all, when a comparison between two mis-shaped arrays occur, you get back a > bone fide python boolean, not a numpy array of bools. So if any action was > taken on t

Re: [Numpy-discussion] read-only or immutable masked array

2013-07-13 Thread Gregorio Bastardo
Hi Stéfan, Thanks for the suggestion, but it does not protect the array: >>> x = np.ma.masked_array(xrange(4), [0,1,0,1]) >>> x masked_array(data = [0 -- 2 --], mask = [False True False True], fill_value = 99) >>> x.mask.flags.writeable = False >>> x.data.flags.writeable

Re: [Numpy-discussion] Allow == and != to raise errors

2013-07-13 Thread Sebastian Berg
On Fri, 2013-07-12 at 19:29 -0400, josef.p...@gmail.com wrote: > On Fri, Jul 12, 2013 at 3:35 PM, Frédéric Bastien wrote: > > I also don't like that idea, but I'm not able to come to a good reasoning > > like Benjamin. > > > > I don't see advantage to this change and the reason isn't good enough t