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

Home » Public Forums » archive » Re: Getting array indices
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: Getting array indices [message #62700 is a reply to message #62698] Tue, 23 September 2008 13:47 Go to previous messageGo to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
On Sep 23, 4:23 pm, Vince Hradil <hrad...@yahoo.com> wrote:
> On Sep 23, 12:53 pm, Jean H <jghas...@DELTHIS.ucalgary.ANDTHIS.ca>
> wrote:
>
>>> Here's a way to get verts:
>
>>> sz = size(array)
>>> nx = sz[0]
>>> ny = sz[1]
>>> nz = sz[2]
>>> ns = sz[sz[0]+2]
>>> verts = findgen(ns)
>
>> Shouldn't it be indgen() ...
>
>>> verts = transpose([ [verts mod nx], [verts/nx mod ny], [verts/nx/
>>> ny] ])
>
>>> BTW, I'd like to find a faster way, if there is one.
>
>> what about this:
>> print, array_indices(arr, indgen(ns))
>
>> Jean
>
> That takes about twice as long as the "MOD" method on my machine:
> x86_64 Win32 Windows Microsoft Windows 7.0 Oct 25 2007    64    64

Because of "indgen(ns)" or because of array_indices?

Paolo
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Getting array indices
Next Topic: Re: what is the best way to do a surface (or 2D) interpolation?

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

Current Time: Fri Oct 10 09:13:48 PDT 2025

Total time taken to generate the page: 0.95509 seconds