Re: Giant arrays! [message #9395] |
Tue, 01 July 1997 00:00 |
Mary Jo Brodzik
Messages: 3 Registered: July 1997
|
Junior Member |
|
|
> P.S. Anybody else want to join in a campaign for a system variable that
> switches the default literal integer to long rather than short? I've
> been bit too many times...
Yes, now that would be useful, I've been bitten a number of times,
myself. And although I try to warn new IDL users, this problem
continues to bite them, too!
--
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mary Jo Brodzik
Scientific Programmer/Analyst
National Snow & Ice Data Center
Cooperative Institute for Research in
Environment Sciences
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
Re: Giant arrays! [message #9403 is a reply to message #9395] |
Mon, 30 June 1997 00:00  |
peter
Messages: 80 Registered: February 1994
|
Member |
|
|
Ben Krasnow (kraz@wco.com) wrote:
: Hi all! I am new to PV-WAVE, and I have a 'can it do this' question:
: I made a simple program that loads a three dimensional(256x256x30
: images) image array, selects one image, and then uses assoc to 'copy'
: one of the images to a two dimensional array. Next I want to transfer
: that into a one-dimensional array so I can use sort on it. the problem
: is the one-dimensional array has to be 65536 elements, to hold the
: single 256x256 image's data. PV-WAVE bombs, and says something to the
: tune of 'too many elements'. Is there another way to do this, without
: breaking the array up(I have to use sort on it)? Thanks
You are probably doing something like
b = fltarr(256*256)
Unfortunately, this bombs because 256 is intepreted as a short integer,
then 256*256=0. If instead you do
b = fltarr(256L*256)
everything will work just fine. Wave, and IDL, can create arrays up to
the memory size of your machine.
Peter
P.S. Anybody else want to join in a campaign for a system variable that
switches the default literal integer to long rather than short? I've
been bit too many times...
|
|
|