in reply to How to call $PDL::BIGPDL=1?

You say 'writing $PDL::BIGPDL=1 doesn't do it'. What is the code? What error message do you get? Could it be that you typed, say, $PDL::BigPDL=1 (not all-caps) instead?

Note that $name->$PDL::BIGPDL tries to call the method whose name is stored in $PDL::BIGPDL on the object $name, which is almost certainly not what you want; and $name = $PDL::BIGPDL = 1 will indeed set $PDL::BIGPDL to 1, but will then put that same 1 into $name, which is probably not what you want. Qualifying $BIGPDL with PDL:: already specifies the package; you don't need the help of an object to do this.

Replies are listed 'Best First'.
Re^2: How to call $PDL::BIGPDL=1?
by Blue_eyed_son (Sexton) on Sep 14, 2008 at 00:17 UTC
    Got it: when I try this:
    $name=$PDL::BIGPDL=zeroes($large_number1,$large_number2);
    It works. Thank you.
      For posterity; the minimum you need to do is:
      $PDL::BIGPDL=1; # true value $name=zeroes($large_number1,$large_number2); # now size not checked
      An even better solution to the problem is to use PDL::IO::FastRaw and memory-map a disk-file, which doesn't allocate any RAM at all:
      use PDL::IO::FastRaw; $name=mapfraw( 'fname', {Creat => 1, Dims => [$large_number1,$large_number2]} );