I believe that sum doesn't work on complex pdl's. Example:

pdl> $a=sequence(5)+10*i*sequence(5)
pdl> p $a->sum
     dimension index 2 larger than greatest dimension at 
/home/mochan/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/PDL/Core.pm
 line 1642.
     PDL::clump(PDL::Complex=SCALAR(0x5605e2c93ab0), 0, 2) called at 
/home/mochan/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/PDL/Complex.pm
 line 1347
     PDL::Complex::sum(PDL::Complex=SCALAR(0x5605e4724408)) called at (eval 
947) line 4
     main::__ANON__() called at 
/home/mochan/perl5/perlbrew/perls/perl-5.24.0/bin/perldl line 719
     eval {...} called at 
/home/mochan/perl5/perlbrew/perls/perl-5.24.0/bin/perldl line 719
     main::eval_and_report("p \$a->sum\x{a}") called at 
/home/mochan/perl5/perlbrew/perls/perl-5.24.0/bin/perldl line 655
     main::process_input() called at 
/home/mochan/perl5/perlbrew/perls/perl-5.24.0/bin/perldl line 675
     eval {...} called at 
/home/mochan/perl5/perlbrew/perls/perl-5.24.0/bin/perldl line 675
It seems sumover does work correctly.

Best regards,
Luis

-- 

                                                                  o
W. Luis Mochán,                      | tel:(52)(777)329-1734     /<(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388     `>/   /\
Apdo. Postal 48-3, 62251             |                           (*)/\/  \
Cuernavaca, Morelos, México          | [email protected]   /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to