Comment 2 for bug 1695763

Revision history for this message
jan (jan-ubuntu-h-i-s) wrote :

Alternatively, change the following code:

diff -r1.1 /usr/lib/x86_64-linux-gnu/perl5/5.22/PDL/Core.pm
1546,1547c1546,1549
< my($s) = ',' x ( ($dim > $pdl->getndims) ? ($pdl->getndims) : ($dim) );
< $s .= '*1,' x ( $dim-$pdl->getndims );
---
> # Avoid negative repeat count warning that came with 5.21 and later.
> my $dim_diff = $dim - $pdl->getndims;
> my($s) = ',' x ( $dim_diff > 0 ? $pdl->getndims : $dim );
> $s .= '*1,' x ( $dim_diff > 0 ? $dim_diff : 0 );