in reply to reading files in PDL matrix
use PDL::Matrix; open my $fh, "<file" or die $!; my (@left, @right) = ((),()); while( <$fh> ) { chop; my ( $left, $right ) = split ','; push @left, $left; push @right, $right; } my $m = PDL::Matrix->pdl([\@left,\@right]);
One world, one people
|
|---|