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 #75981] Tue, 10 May 2011 12:37 Go to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On May 10, 9:48 am, David Fanning <n...@idlcoyote.com> wrote:
> David Fanning writes:
>
> Sorry, but these lines:
>
>>     ; The rows must be a vector.
>>     IF N_Elements(rows) EQ 1 THEN rows = [rows]
>
> Should be written like this:
>
>     ; The rows must be a vector.
>     IF Size(rows, /N_DIMENSIONS) EQ 0 THEN rows = [rows]
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

JD Smith would probably say that it's faster to construct your own
index arrays, right? Maybe like this?

nrow = n_elements(goodrows)
cols = rebin(lindgen(dims[0]),[dims[0],nrow],/sample)
rows = rebin(transpose(goodrows),[dims[0],nrow],/sample)

return, array[cols,rows]
[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 15:32:58 PDT 2025

Total time taken to generate the page: 0.00461 seconds