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

Home » Public Forums » archive » Initialize new variable array with nan or -9999 values
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: Initialize new variable array with nan or -9999 values [message #87648 is a reply to message #87645] Thu, 20 February 2014 14:14 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Thursday, February 20, 2014 4:33:01 PM UTC-5, Paul van Delst wrote:
> On 02/20/14 13:36, John Correira wrote:

For large arrays, there is a speed advantage to using REPLICATE or MAKE_ARRAY in which the array is initialized with the correct value, as opposed to

fltarr(304,336,500) - 9999

in which the array is first initialized with zeros, and then 9999 is subtracted from each element. Most computers should be able easily handle a 50 Mb array, so in this case the speed difference would be a fraction of a second. But it is something to keep in mind when arrays are large enough that a factor of two speed improvement matters. --Wayne
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem with cgcmdwindow__define
Next Topic: Position, normal coordinates, and multiple images

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

Current Time: Fri Oct 10 06:16:16 PDT 2025

Total time taken to generate the page: 0.64370 seconds