comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: operation with array of NaNs
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: operation with array of NaNs [message #52437 is a reply to message #52436] Wed, 31 January 2007 15:17 Go to previous message
news.qwest.net is currently offline  news.qwest.net
Messages: 137
Registered: September 2005
Senior Member
<inardello@odu.edu> wrote in message
news:1170284491.683686.134280@a34g2000cwb.googlegroups.com.. .
> Hello there,
>
> I am quite new to IDL and found an interesting problem.
>
> I have an array of elements (5x5).
> All the elements in the array are NaN(s).
>
> When I ask what is the number of locations (n_elements) where the
> elements of this array are e.g.: "finite", the answer is "1".


I think you want total(), instead of N_elements().

IDL> print,total(finite([!values.f_nan,!values.f_nan]))

0.000000





Cheers,

bob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Cutting/Exclude ROI's based on overlapping
Next Topic: netCDF/CF conventions

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Dec 02 18:03:29 PST 2025

Total time taken to generate the page: 0.13934 seconds