[Matrix-SIG] More on NaN and bugs? : was [Matrix-SIG] NaN
Yoon, Hoon (CICG - NY Program Trading)
HYoon@exchange.ml.com
Thu, 8 Oct 1998 09:11:03 -0400
Paul,
Tried both scalar and vector (tried vector because I was following what
you were doing). Neither works.
A simple answer is multiply the scalar or vector or matrix with
zeros(vec.shape), then equal(org, zeros).
Any 0's should be either NaN or Infinity. That should be close as long as I
don't have infinity in there, but I
can use your inf cmp for that. So, your solution still helps.
Can anyone think of other exceptions I should worry about?
Thanks,
Hoon,
----
More NaN ?
There was a movement to get NaN as standard missing on a matrix for both
float and complex. Do anyone
know what happened to that?
Bugs?
I could not get binaryseach to work in my NumPy (comes back w/ Trace back
Name error) and
argsort seems to have a bug. It may due to the fact thatI have a very old
version of NumPy
(still was Beta 1.5 yr ago).
Has there been fix for either one since I installed?
How do I find out what version I have? My SA takes care of these things and
it takes me more than some effort
to upgrade my installation. (I am still using 1.4 heaven sakes)
Thanks,
Hoon,
> -----Original Message-----
> From: Paul F. Dubois
> Sent: Wednesday, October 07, 1998 7:24 PM
> To: Yoon, Hoon (CICG - NY Program Trading)
> Subject: Re: [Matrix-SIG] NaN (almost)
>
> Uh, maybe I'm missing something, but NaNv is a vector, not a scalar; don't
> you want NaNv[0] passed to equal?
> -----Original Message-----
> From: Yoon, Hoon (CICG - NY Program Trading) <HYoon@exchange.ml.com>
> To: 'Paul F. Dubois' <dubois1@llnl.gov>; matrix-sig@python.org
> <matrix-sig@python.org>
> Date: Wednesday, October 07, 1998 3:17 PM
> Subject: RE: [Matrix-SIG] NaN (almost)
>
>
> >Thanks Paul, but not quite....
> >
> >>>> excP
> >array([ 9.12500000e+000, 9.27519777e+000, 9.25000000e+000,
> >9.06250000e+000,
> > 8.93750000e+000, NaN, 9.00000000e+000,
> > 9.00000000e+000, 9.00000000e+000, NaN,
> > 9.00000000e+000, NaN, NaN,
> > 9.00000000e+000, NaN, 9.00000000e+000,
> > NaN, 9.00000000e+000, NaN,
> > 8.93750000e+000, 8.93750000e+000, NaN,
> > 9.02269591e+000, NaN, NaN,
> > NaN, NaN, 0.00000000e+000])
> >>>> infini = (array([1.0])/array([0.0]))/[0]
> >>>> x = array([1.,2.,3.])
> >>>> y = array([1.,0.,1.])
> >>>> equal(x/y, infini)
> >array([0, 1, 0])
> >>>> NaNv = 1e1000000 - 1e10000000
> >>>> NaNv = array((1e1000000 - 1e10000000))
> >>>> NaNv
> >NaN
> >>>> NaNv = infini - infini
> >>>> NaNv
> >array([ NaN])
> >>>> equal(excP, NaNv)
> >array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> 0,
> >0, 0, 0,
> > 0, 0])
> >
> >No wonder
> >
> >equal(NaNv, NaNv) is 0 too:
> >Appreciate it neverthless,
> >
> >Hoon,
> >