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

Home » Public Forums » archive » Re: IDL Way to Remove Rows of an Array
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: IDL Way to Remove Rows of an Array [message #76122 is a reply to message #75981] Tue, 17 May 2011 09:59 Go to previous message
JDS is currently offline  JDS
Messages: 94
Registered: March 2009
Member
> JD Smith would probably say that it's faster to construct your own
> index arrays, right? Maybe like this?

Probably not in this case. Typically it's faster to roll your own index lists when the list you are constructing is smaller than the list IDL has to construct, for example if you are further sub-indexing it. The rule of thumb is to try not to make IDL do lots of work you will then promptly throw away.

In this case, your list over columns, and the list IDL would create using "*" are identical. So I'd probably simply go with '*'. If you have a 'reject' list instead of 'keep' (as in David's example) a closely related but somewhat simpler/faster method is:

d=size(array,/DIMENSIONS)
array=array[*,where(~histogram(reject,MIN=0,MAX=d[1]-1),/NUL L)]
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: about jessica biel
Next Topic: IDL Way to Remove Rows of an Array

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

Current Time: Wed Oct 08 19:32:44 PDT 2025

Total time taken to generate the page: 0.00407 seconds