For what it is worth, the slice() syntax for a dummy dimension of size a is '*a' and not '* a' or anything else. That said, it could be made more permissive without breaking anything. The niceslice syntax does work with this construct...
Cheers, Chris On Tue, Jan 24, 2012 at 12:11 PM, Ingo Schmid <[email protected]> wrote: > Hi, > a minor bug but annoying to debug ... took me about an hour to find what's > wrong ... > > PDL (latest build) produced the following error : > > print $cab2->dummy(-1,$$p{ky})->info; > > $cabc2->info: PDL: Double D [128,6,1,2,8] > > $$p{ky} is ' 128 ' - single quotes are only to show the padding white > space. > > > Invalid slice str ',,,,,* 128 ': ' 128 ' at Basic/Core/Core.pm.PL (i.e. > PDL::Core.pm) line 396 > PDL::Core::barf('Invalid slice str \',,,,,* 128 \': \' 128 \'') called > at Basic/Core/Core.pm.PL (i.e. PDL::Core.pm) line 1592 > PDL::dummy('PDL=SCALAR(0x1df98c0)', -1, ' 128 ') called at > /home/ingo/perl/reco_utils.pm line 84 > reco_utils::epi('PDL=SCALAR(0x1df9998)', 'PDL=SCALAR(0x1df98a8)', > 'PDL=SCALAR(0x1df9d28)', 'HASH(0x1dc9830)') called at > /home/ingo/perl/reco_utils.pm line 364 > reco_utils::fou('PDL=SCALAR(0x1df9bf0)', 'HASH(0x1dc9830)', > 'PDL=SCALAR(0x1df9f38)') called at /home/ingo/perl/offline-reco.pl line 263 > at Basic/Core/Core.pm.PL (i.e. PDL::Core.pm) line 396 > PDL::Core::barf('Invalid slice str \',,,,,* 128 \': \' 128 \'') called > at Basic/Core/Core.pm.PL (i.e. PDL::Core.pm) line 1592 > PDL::dummy('PDL=SCALAR(0x1df98c0)', -1, ' 128 ') called at > /home/ingo/perl/reco_utils.pm line 84 > reco_utils::epi('PDL=SCALAR(0x1df9998)', 'PDL=SCALAR(0x1df98a8)', > 'PDL=SCALAR(0x1df9d28)', 'HASH(0x1dc9830)') called at > /home/ingo/perl/reco_utils.pm line 364 > reco_utils::fou('PDL=SCALAR(0x1df9bf0)', 'HASH(0x1dc9830)', > 'PDL=SCALAR(0x1df9f38)') called at /home/ingo/perl/offline-reco.pl line 263 > Died at /home/ingo/perl/offline-reco.pl line 351. > > The following works: > > print $cab2->dummy(-1,($$p{ky})*1.)->info; > > > > > _______________________________________________ > Perldl mailing list > [email protected] > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl > _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
