dannyjmh has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks! I'm using Perl's PDL in a long piece of code with lots of dependencies, as you'll see below. But for some reason, in a line analog to line 18 of this sample, I ge the error: Undefined subroutine &PDL::divide. Can you tell me where is the conflict, please? Sorry i can't paste the real code. It would bore you anyway :) Thanks!!
#!/usr/bin/perl -w use strict; use Tie::File; use Tie::File::AsHash; use Term::ProgressBar; use Math::Combinatorics; use Math::Cartesian::Product; use Array::Utils qw(array_minus); use Statistics::Basic qw(stddev mean); use POSIX qw(isdigit); use PDL; use PDL::Core qw(pdl); use PDL::Math qw(isfinite); my $div = 4; my @array1 = (0..10); my $pdl_array = log(pdl(@array1)/$div); $pdl_array->where(!isfinite($pdl_array)) .= 0; my($mean,$stdev) = statsover($pdl_array); die $pdl_array,"\n",$mean," ",$stdev,"\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Undefined subroutine &PDL::divide
by tobyink (Canon) on Jul 01, 2014 at 08:29 UTC | |
|
Re: Undefined subroutine &PDL::divide
by Laurent_R (Canon) on Jul 01, 2014 at 17:55 UTC |