Re: Most Common IDL Programming Errors [message #59912 is a reply to message #59772] |
Fri, 11 April 2008 09:02   |
R.G. Stockwell
Messages: 363 Registered: July 1999
|
Senior Member |
|
|
"Tom McGlynn" <tam@milkyway.gsfc.nasa.gov> wrote in message
news:08513f0c-9af3-4613-900c-2449d1306fc5@l42g2000hsc.google groups.com...
> On Apr 9, 10:18 pm, Tom McGlynn <t...@milkyway.gsfc.nasa.gov> wrote:
> ...
>> Another is fogetting the inherently parallel nature of array
>> operations, e.g., something like expecting
>>
>> x=[0,1,1,2,2,2]
>> y=indgen(3)
>>
>> y[x] = y[x]+1
>>
>> to give something other than 1,1,1.
>>
> And perhaps I should include using the XXXgen functions when one
> means XXXarr!
> Tom
XXXarr needs a /nan keyword (to fill it with nans).
I always use it like
a = fltarr(len) + !values.f_nan
-bob
|
|
|