Hi Ed,
I use last version of PDL 2.081. This problem also affected preview
2.080 version.
Other machine has Fedora Core 36 with perl 5.34 and PDL 2.076
Best regards,
Yury
04.11.2022 18:49, Ed. пишет:
Hi Yury,
I had a look and I don’t think Slackware packages PDL. Can you tell us
what version of PDL you have installed, on the two machines where
you’ve tried your script?
Best regards,
Ed
*From: *Yury Pakhomov <mailto:[email protected]>
*Sent: *03 November 2022 13:14
*To: *perldl <mailto:[email protected]>
*Subject: *[Pdl-general] PDL::NiceSlice and Perl 5.36
Hello All!
After update my system (Slackware 15) some PDL programs crashed.
For example, below is simple part of my code.
code.pl
________________________________
#! /usr/bin/perl -w
#use v5.36;
use PDL;
use PDL::NiceSlice;
my $c=299792;
my $x=5000+sequence(100);
# Average step in lam
my $dx=($x((-1))-$x((0)))/(nelem($x)-1);
# Minimal step in V scale
my $dV=$c*$dx/$x((-1));
# Create uniform V scale (km/s)
my $n=int(log($x((-1))/$x((0)))/log(1+$dV/$c))+2;
my $v=sequence($n)*$dV;
_________________________________
# perl -c code.pl
syntax error at bad2.pl line 14, near "$x("
bad2.pl had compilation errors.
If I change line 14 to "my $dV=$c*$dx/$x->at(-1)->sclr;" then works fine.
Also the original code in other computer (perl 5.34) works fine too.
Moreover, if delete last three lines in code.pl, then it works!
Where source of these errors?
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general