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

Home » Public Forums » archive » Re: REFORM: new subscripts must not change the number elements in 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: REFORM: new subscripts must not change the number elements in array [message #77949 is a reply to message #77935] Sun, 16 October 2011 01:18 Go to previous messageGo to previous message
eva.ivits-wasser is currently offline  eva.ivits-wasser
Messages: 8
Registered: October 2011
Junior Member
Ohhhhhh...that was it!

Sorry for such a beginners mistake but thanks a lot for your help!

Cheers,
Eva

On Oct 15, 3:38 pm, David Grier <david.gr...@nyu.edu> wrote:
> Hi Eva,
>
> If ns and nl are "regular" integers, then ns * nl can overflow the
> maximum integer, leading to the behavior you describe.
>
> Casting ns and nl to long integers will fix this:
>
> IDL> ns = 1194
> IDL> nl = 686
> IDL> print, ns * nl ; WRONG
> 32652
>
> IDL> ns = 1194L
> IDL> nl = 686L
> IDL> print, ns * nl ; RIGHT
> 819084
>
> TTFN,
>
> David
>
> On 10/15/11 7:34 AM, eva.ivits-was...@ext.jrc.ec.europa.eu wrote:
>
>
>
>
>
>
>
>> Good day,
>
>> I have a 3D array of
>> ts=Int[1194,12,686]
>
>> It's an image with 1194 columns, 12 bands and 686 lines.
>
>> I'm running REFORM on the transposed array but get the well known
>> error message:
>> "REFORM: New subscripts must not change the number elements in
>> <INT       Array[1194, 686, 12]>"
>
>> This is what I'm doing:
>> tr=reform(transpose(ts,[0,2,1]),ns*nl,nb)
>
>> i.e. first I transpose the lines onto the second dimension and then
>> create "tr" so that it is a 2D array of ns*nl (1194*686) and nb (12).
>
>> Why isn't it working?
>
>> I'm desparate....pls help!
>
>> Thanks,
>
>> Eva
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: compute quartiles of a distribution
Next Topic: Re: Matrix in IDL

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

Current Time: Fri Oct 10 06:16:40 PDT 2025

Total time taken to generate the page: 1.04076 seconds