Re: [Numpy-discussion] __array_priority__ don't work for gt, lt, ... operator

2013-05-15 Thread Frédéric Bastien
This is a different issue then mine. Mine is that array_priority is not implemented for comparison. Your is that array_priority isn't used when __array__ is defined. Maybe you can make a new mailing list thread? Issue get more attention when there is an associated email. I looked rapidly in numpy

Re: [Numpy-discussion] __array_priority__ don't work for gt, lt, ... operator

2013-05-12 Thread Thomas Robitaille
I've also been having issues with __array_priority__ - the following code behaves differently for __mul__ and __rmul__: """ import numpy as np class TestClass(object): def __init__(self, input_array): self.array = input_array def __mul__(self, other): print "Called __mu

Re: [Numpy-discussion] __array_priority__ don't work for gt, lt, ... operator

2013-05-10 Thread Frédéric Bastien
thanks, I'll look at it. I made a PR: https://github.com/numpy/numpy/pull/3324 Where should I put the tests about this? thanks Fred On Fri, May 10, 2013 at 4:03 PM, Sebastian Berg wrote: > On Fri, 2013-05-10 at 15:35 -0400, Frédéric Bastien wrote: > > I'm trying to do it, but each time I wan

Re: [Numpy-discussion] __array_priority__ don't work for gt, lt, ... operator

2013-05-10 Thread Sebastian Berg
On Fri, 2013-05-10 at 15:35 -0400, Frédéric Bastien wrote: > I'm trying to do it, but each time I want to test something, it takes > a long time to rebuild numpy to test it. Is there a way to don't > recompile everything for each test? > Are you using current master? It defaults to use ENABLE_SEPA

Re: [Numpy-discussion] __array_priority__ don't work for gt, lt, ... operator

2013-05-10 Thread Frédéric Bastien
I'm trying to do it, but each time I want to test something, it takes a long time to rebuild numpy to test it. Is there a way to don't recompile everything for each test? thanks Fred On Fri, May 10, 2013 at 1:34 PM, Charles R Harris wrote: > > > On Fri, May 10, 2013 at 10:08 AM, Frédéric Bast

Re: [Numpy-discussion] __array_priority__ don't work for gt, lt, ... operator

2013-05-10 Thread Charles R Harris
On Fri, May 10, 2013 at 10:08 AM, Frédéric Bastien wrote: > Hi, > > it popped again on the Theano mailing list that this don't work: > > np.arange(10) <= a_theano_vector. > > The reason is that __array_priority__ isn't respected for that class of > operation. > > This page explain the problem and

[Numpy-discussion] __array_priority__ don't work for gt, lt, ... operator

2013-05-10 Thread Frédéric Bastien
Hi, it popped again on the Theano mailing list that this don't work: np.arange(10) <= a_theano_vector. The reason is that __array_priority__ isn't respected for that class of operation. This page explain the problem and give a work around: http://stackoverflow.com/questions/14619449/how-can-i-