Re: [Numpy-discussion] A couple more Numeric incompatibilitiesand a possible bug
![](https://secure.gravatar.com/avatar/e2eccf1773826049905a11f3f5c0e6a4.jpg?s=120&d=mm&r=g)
Actually, this reproduces the problem:
from numarray import * from numarray.objects import * abs(-1.) ObjectArray(1.0) abs(-1) ObjectArray(1)
Please ignore this bit of my previous message:
abs(-1) ObjectArray(1)
Something in my environment (probably me) got a bit confused.
Gary
-- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm
![](https://secure.gravatar.com/avatar/faf9400121dca9940496a7473b1d8179.jpg?s=120&d=mm&r=g)
On Sat, 2004-03-27 at 01:48, Gary Ruben wrote:
Actually, this reproduces the problem:
from numarray import * from numarray.objects import * abs(-1.) ObjectArray(1.0) abs(-1) ObjectArray(1)
I'm guessing, but I think you would like to see:
abs(-1.) 1.0 abs(1) 1
If so, this is a bug. Two things are going on: 1) numarray.objects redefines abs() 2) Internally, numarray has a concept of "rank-0" arrays which it uses to represent scalars. Apparently, numarray.objects lacks the extra code to filter rank-0 arrays out (convert back to scalars) as is done with numerical arrays. I logged this as a bug on Source Forge and it will be fixed for 1.0. Regards, Todd -- Todd Miller <jmiller@stsci.edu>
participants (2)
-
Gary Ruben
-
Todd Miller