Re: Behaviour of REFORM() changed in IDL 5.5? [message #29308 is a reply to message #29253] |
Mon, 11 February 2002 05:29  |
Robert Stockwell
Messages: 74 Registered: October 2001
|
Member |
|
|
Georg Wiora wrote:
> Am Fri, 08 Feb 2002 11:15:02 -0700, hat Robert Stockwell
> <rgs1967@hotmail.com> geschrieben:
>
>> Georg Wiora wrote:
>>
>>
>>> Here is my example:
>>> array = INDGEN(100)
>>> image = REFORM(100,1)
>>>
> Sorry for the Typo :-\
> It's obviously
> image = REFORM(array,100,1)
Yes, I noticed that you must have meant the above :)
>> Hi Georg,
>>
>> What os are you? A Windows one? Unfortunately my win2000
>>
> I have a WIN 2000 system.
>
> When I try it on the command line, it works fine, but not in
> my application. Probably it is just some instability problem.
WOW, that would indeed be a serious bug. Can you post the
offending code (shortened down as much as you can)?
I did a quick test, and reform seems to work fine for me
when its in a functionm (IDL5.5 linux). Is there perhaps
another operation you perform that implicitly
causes "IMAGE" to get rid of the single dimension?
For instance, in the example below, multiplying image by 2
causes the extra dimension to be dropped.
Cheers,
bob
function test_reform
array = INDGEN(100)
image = REFORM(array,100,1)
help,image
newimage = image*2
help,newimage
return,image
end
; main level code
r = test_reform()
help,r
end
Results:
IMAGE INT = Array[100, 1]
NEWIMAGE INT = Array[100]
R INT = Array[100, 1]
|
|
|