Re: [Numpy-discussion] f.p. powers and masked arrays

2006-06-25 Thread Michael Fitzgerald
On Saturday 24 June 2006 13:12, Pierre GM wrote: > I haven't really time to double-check/create a patch, tough. Meanwhile, > Michael, you could just modify your numpy/core/ma.py accordingly. Hi Pierre, Thank you for the fix. I checked it out and and numpy now behaves correctly for 0**1. in mask

Re: [Numpy-discussion] f.p. powers and masked arrays

2006-06-24 Thread Pierre GM
Michael, > Is anyone else seeing this? It should be easy to test. If so, I > think it's a bug. Yeah, I see that as well. In MA.power(a,b), a temporary mask is created, True for values a<=0. (check L1577 of the sources, `md = make_mask(umath.less_equal (fa, 0), flag=1)`). The combination of thi

Re: [Numpy-discussion] f.p. powers and masked arrays

2006-06-23 Thread Michael Fitzgerald
Ping! Is anyone else seeing this? It should be easy to test. If so, I think it's a bug. Best, Mike On Jun 21, 2006, at 9:39 PM, Michael Fitzgerald wrote: > > Hello all, > > I'm encountering some (relatively new?) behavior with masked arrays > that > strikes me as bizarre. Raising zero

[Numpy-discussion] f.p. powers and masked arrays

2006-06-21 Thread Michael Fitzgerald
Hello all, I'm encountering some (relatively new?) behavior with masked arrays that strikes me as bizarre. Raising zero to a floating-point value is triggering a mask to be set, even though the result should be well-defined. When using fixed-point integers for powers, everything works as exp