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

Home » Public Forums » archive » Dropped dimensions?
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: Dropped dimensions? [message #80739 is a reply to message #14805] Sun, 01 July 2012 00:43 Go to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
On 1 juil, 07:51, Craig Markwardt <craig.markwa...@gmail.com> wrote:
> On Thursday, June 28, 2012 3:07:39 PM UTC-5, wlandsman wrote:
>> On Thursday, June 28, 2012 3:45:45 PM UTC-4, wlandsman wrote:
>>> On Sunday, March 28, 1999 3:00:00 AM UTC-5, Craig Markwardt wrote:
>
>>> How do you end up with a scalar?    At least since IDL V7.1, I find,
>
>> To answer my own question, the subsequent processing might convert a 1 element array to a scalar.       I do try to have my own programs avoid such conversions, but it can be hard to maintain consistency.   --Wayne
>
> I try too, but sometimes it just works out that a scalar pops out.
>
> Wow, this thread started 13 years ago!
>
> Craig
>
>

I do not feel that the implicit reforming of arrays dimensions is a
too strong problem (even if discussed for 13 years!). First, because
only the last dimension of an array can be concerned (with possible
recursion); second, because the problem arises only in the case of a
statement explicitly asking for dimension (like total, max, mean...).
Then if you like to be generic, you must use, as Craig's said, some
construct like total(reform([array], mydims), dim). In all other
cases, this IDL rule is an advantage rather than an inconvenience.
alain.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: overwrite output to screen; unix vs windows
Next Topic: plotting an array values keeping origin as a reference value

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

Current Time: Sun Nov 30 14:47:06 PST 2025

Total time taken to generate the page: 1.76783 seconds