pdl

How is PDL used in real-world programming?

I've been reading code complete, not far in yet but one of the things it talks about is PDL - a higher level design language, which you write each routine in before coding in the language of choice. I wondered if anyone actually did this in real life? Another thing it says is to leave each line of PDL in the code as comments. Surely t...

How to use threads to replace looping a subroutine in perl/pdl

I have a perfectly good perl subroutine written as part of a perl module. Without going into too many details, it takes a string and a short list as arguments (often taken from terminal) and spits out a value (right now, always a floating point, but this may not always be the case.) Right now, the list portion of my argument takes two v...

How can I use PDL rcols in a subroutine with pass-by-reference?

Specifically, I want to use rcols with the PERLCOLS option. Here's what I want to do: my @array; getColumn(\@array, $file, 4); # get the fourth column from file I can do it if I use \@array, but for backward compatibility I'd prefer not to do this. Here's how I'd do it using an array-ref-ref: sub getColumn { my ($arefref, $f...

Is there an equivalent to the perl debugger 'x' in pdl2 (or Devel::REPL)?

I am using pdl2 (the PDL shell) also as a my default Perl interactive shell (it loads all the nice plugins for Devel::REPL). But I am missing the x dumper-printing alias. p is nice for piddles but it does not work for a normal array ref or hash ref. I have loaded Data::Dumper but it lacks an easy way of controlling depth and I like the w...