Re: Turning off math error checking for a code block [message #28894 is a reply to message #28890] |
Thu, 17 January 2002 11:48   |
k-bowman
Messages: 12 Registered: December 2001
|
Junior Member |
|
|
In article <3C47094C.1F1879D2@ssec.wisc.edu>, "Liam E. Gumley" <Liam.Gumley@ssec.wisc.edu> wrote:
> The FINITE function returns 1 where the argument is finite, and 0 where
> the argument is infinite *or* NaN (see p. 134 of my book). Try the
> following:
>
> x_min = 2.0
> index = where(finite(x) eq 1, count)
> if (count gt 0) then print, where(x[index] lt x_min)
I am aware of that. These are relatively large vectors (10^5 to 10^6 elements), however, and this operation is repeated many times, so I am trying to avoid extracting the finite values (or creating an array index to them). This is my "innermost loop", and efficiency is important. I know there are NaN's. I prefer to simply turn off the error messages.
Perhaps a /NAN keyword on the WHERE function would be useful? (as in, for example, TOTAL)
Ken
P.S. For symmetry, wouldn't it be nice to have an INFINITE function?
|
|
|