Re: [Numpy-discussion] Wanted: new release manager for 1.5 and above

2010-01-14 Thread David Cournapeau
Charles R Harris wrote: > > > On Wed, Jan 13, 2010 at 11:34 PM, David Cournapeau > mailto:da...@silveregg.co.jp>> wrote: > > Charles R Harris wrote: > > > > > > > What is the setup one needs to build the installers? It might be > well to > > document that, the depen

Re: [Numpy-discussion] Wanted: new release manager for 1.5 and above

2010-01-14 Thread Charles R Harris
On Wed, Jan 13, 2010 at 11:34 PM, David Cournapeau wrote: > Charles R Harris wrote: > > > > > > > What is the setup one needs to build the installers? It might be well to > > document that, the dependencies, and the process. > > Right. The top script is: > http://projects.scipy.org/numpy/browser/t

Re: [Numpy-discussion] Matrix vs array in ma.minimum

2010-01-14 Thread David Cournapeau
On Fri, Jan 15, 2010 at 11:59 AM, Pierre GM wrote: > On Jan 14, 2010, at 8:52 PM, David Cournapeau wrote: >> Pierre GM wrote: >> >>> >>> Er, no. >>> np.ma.minimum(a, b) returns the lowest value of a and b element-wsie, or >>> the the lowest element of a is b is None. The behavior is inherited fro

Re: [Numpy-discussion] comparison operators (e.g. ==) on array with dtype object do not work

2010-01-14 Thread Charles R Harris
On Thu, Jan 14, 2010 at 3:49 PM, Warren Weckesser < warren.weckes...@enthought.com> wrote: > Yaroslav Halchenko wrote: > > Dear NumPy People, > > > > First I want to apologize if I misbehaved on NumPy Trac by reopening the > > closed ticket > > http://projects.scipy.org/numpy/ticket/1362 > > but I

Re: [Numpy-discussion] Matrix vs array in ma.minimum

2010-01-14 Thread Pierre GM
On Jan 14, 2010, at 8:52 PM, David Cournapeau wrote: > Pierre GM wrote: > >> >> Er, no. >> np.ma.minimum(a, b) returns the lowest value of a and b element-wsie, or the >> the lowest element of a is b is None. The behavior is inherited from the >> very first implementation of maskedarray in nume

Re: [Numpy-discussion] Matrix vs array in ma.minimum

2010-01-14 Thread David Cournapeau
Pierre GM wrote: > > Er, no. > np.ma.minimum(a, b) returns the lowest value of a and b element-wsie, or the > the lowest element of a is b is None. The behavior is inherited from the very > first implementation of maskedarray in numeric. This itself is unexpected, > since np.minimum requires a

Re: [Numpy-discussion] comparison operators (e.g. ==) on array with dtype object do not work

2010-01-14 Thread Yaroslav Halchenko
Hi Warren, > The "problem" is that the tuple is converted to an array in the > statement that does the comparison, not in the construction of the > array. Numpy attempts > to convert the right hand side of the == operator into an array. > It then does the comparison using the two arrays. Thanks

Re: [Numpy-discussion] comparison operators (e.g. ==) on array with dtype object do not work

2010-01-14 Thread Yaroslav Halchenko
On Thu, 14 Jan 2010, josef.p...@gmail.com wrote: > It looks difficult to construct an object array with only 1 element, > since a tuple is interpreted as different array elements. yeap > It looks like some convention is necessary for interpreting a tuple in > the array construction, but it doesn'

Re: [Numpy-discussion] comparison operators (e.g. ==) on array with dtype object do not work

2010-01-14 Thread josef . pktd
On Thu, Jan 14, 2010 at 5:49 PM, Warren Weckesser wrote: > Yaroslav Halchenko wrote: >> Dear NumPy People, >> >> First I want to apologize if I misbehaved on NumPy Trac by reopening the >> closed ticket >> http://projects.scipy.org/numpy/ticket/1362 >> but I still feel strongly that there is misun

Re: [Numpy-discussion] comparison operators (e.g. ==) on array with dtype object do not work

2010-01-14 Thread Warren Weckesser
Yaroslav Halchenko wrote: > Dear NumPy People, > > First I want to apologize if I misbehaved on NumPy Trac by reopening the > closed ticket > http://projects.scipy.org/numpy/ticket/1362 > but I still feel strongly that there is misunderstanding > and the bug/defect is valid. I would appreciate if

[Numpy-discussion] comparison operators (e.g. ==) on array with dtype object do not work

2010-01-14 Thread Yaroslav Halchenko
Dear NumPy People, First I want to apologize if I misbehaved on NumPy Trac by reopening the closed ticket http://projects.scipy.org/numpy/ticket/1362 but I still feel strongly that there is misunderstanding and the bug/defect is valid. I would appreciate if someone would waste more of his time t

[Numpy-discussion] hello~

2010-01-14 Thread Richard D. Moores
Hi,One of my friends introduce a very good website to me: http://www.flsso.com/. All their products are new and original. They have many brands, such as Sony, HP, Apple, Nokia and so on. Now , they are promoting their products for the coustomers. So their prices are very competitive. By the way, th

Re: [Numpy-discussion] dtype.isbuiltin changed by .newbyteorder

2010-01-14 Thread Matthew Brett
Hi, > It is at least undesirable. It may not be a bug per se as I don't > think that we guarantee that .isbuiltin is free from false negatives > (though we do guarantee that it is free from false positives). The > reason is that we would have to search the builtin dtypes for a match > every time w

Re: [Numpy-discussion] dtype.isbuiltin changed by .newbyteorder

2010-01-14 Thread Robert Kern
On Thu, Jan 14, 2010 at 07:01, Matthew Brett wrote: > Hi, > > Over on the scipy list, someone pointed out an oddness in the output > of the matlab reader, which revealed this - to me - unexpected > behavior in numpy: > > In [20]: dt = np.dtype('f8') > > In [21]: dt.isbuiltin > Out[21]: 1 > > In [2

[Numpy-discussion] dtype.isbuiltin changed by .newbyteorder

2010-01-14 Thread Matthew Brett
Hi, Over on the scipy list, someone pointed out an oddness in the output of the matlab reader, which revealed this - to me - unexpected behavior in numpy: In [20]: dt = np.dtype('f8') In [21]: dt.isbuiltin Out[21]: 1 In [22]: ndt = dt.newbyteorder('<') In [23]: ndt.isbuiltin Out[23]: 0 I was

Re: [Numpy-discussion] Matrix vs array in ma.minimum

2010-01-14 Thread Pierre GM
On Jan 14, 2010, at 4:53 AM, David Cournapeau wrote: > Hi, > > I encountered a problem in matlab which boils down to a surprising > behavior of np.ma.minimum: > > x = np.random.randn(2, 3) > mx = np.matrix(x) > > np.ma.minimum(x) # smallest item of x > ret = np.ma.minimum(mx) # flattened version

[Numpy-discussion] Matrix vs array in ma.minimum

2010-01-14 Thread David Cournapeau
Hi, I encountered a problem in matlab which boils down to a surprising behavior of np.ma.minimum: x = np.random.randn(2, 3) mx = np.matrix(x) np.ma.minimum(x) # smallest item of x ret = np.ma.minimum(mx) # flattened version of mx, i.e. ret == mx.flatten() Is this expected ? cheers, David ___

Re: [Numpy-discussion] wrong casting of augmented assignment statements

2010-01-14 Thread Sebastian Walter
I've written a self-contained example that shows that numpy indeed tries to call the __float__ method. What is buggy is what happens if calling the __float__ method raises an Exception. Then numpy assumes (in this case wrongly) that the object should be casted to the neutral element. I'd guess th

Re: [Numpy-discussion] Getting Callbacks with arrays to work

2010-01-14 Thread Jon Moore
Hi, Thanks all works now! The implicit none only didn't work when defining dv as a function now its a subroutine it seems to work. Regards Jon On 12/01/2010 13:44, Pearu Peterson wrote: > Hi, > > The problem is that f2py does not support callbacks that > return arrays. There is easy workaroun