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:pakho...@inasan.ru>
Sent: 03 November 2022 13:14
To: perldl<mailto:pdl-general@lists.sourceforge.net>
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
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general

_______________________________________________
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to