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

Home » Public Forums » archive » Summer "English" heat or just me: Array slicing
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: Summer "English" heat or just me: Array slicing [message #85315 is a reply to message #85314] Wed, 24 July 2013 07:19 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Fabien writes:

> This is what you said 14 years ago ;-)

Sigh... My life wasted.

> I think I understood this part:
>
> ;-Quoting Henry Chapman----------------------------------------------
>
> There are two behaviours you may want when you try result = array[x,
> y,..., z], and x, y, ..., z are 1-d arrays:
>
> 1. return a 1-d array with result[i] = array[x[i], y[i],..., z[i]]
> 2. return a 2-d array with result[i, j,..., k] = array[x[i],
> y[j],...,z[k]]
>
> IDL does (1), which requires x, y,...,z all have the same length.
> However, IDL does (2) if one of the dimensions is a subscript range.
> Since a single number is a subscript range, it will do (2) in that
> case. And since 0, written in as an extra dimension is also a subscript
> range, IDL will use behaviour (2)
> ;----------------------------------------------------------- --------
>
> I must admit that I am only really rarely confronted to cases where I
> can use this, but it is good to know...

I think this has to do with an "index threading" article JD wrote,
although I can't find a reference to it right now.

I guess I do understand it. Sorta. I just don't want to have to explain
it to anyone. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Thickness of /box_axes?
Next Topic: Dashed linestyle in vectorized function graphics output, IDL 8.2.3

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

Current Time: Wed Oct 08 19:36:59 PDT 2025

Total time taken to generate the page: 0.00387 seconds