Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

How can I increase the size of a PDL piddle? I guess I can only store upto 1000 elements in a piddle. Is there any way to increase the size?

Replies are listed 'Best First'.
Re: How to increse size of a PDL piddle? (type)
by Anonymous Monk on Jul 02, 2013 at 14:33 UTC

      Thank you. I found what I was looking for in the PDL cheat sheet.There is a module to print any size piddle and override the 30000 elements limit.

Re: How to increse size of a PDL piddle?
by etj (Priest) on May 22, 2022 at 01:59 UTC
    To change the size of a PDL ndarray, use $pdl->setdims(\@newdims).

    There are no limits to ndarray size other than available RAM, and to avoid that limit, you can use PDL::IO::FastRaw for memory-mapping a disk file (though you can't resize that - but you could make a bigger one and copy data over).