in reply to Hash-type lookup in PDL
The cool thing about slices, is that whatever operation you perform on the slice, also occurs to the original piddle.
#!/usr/bin/perl use warnings; use strict; use PDL::LiteF; my $x = sequence(25); # Create a piddle of increasing value print "$x\n"; my $slice = slice $x,'4:20:2'; print $slice; print "\n"; $slice .= 0; print $slice; print "\n"; print $x; print "\n"; for (1..100){ $slice ++; print $x; print "\n"; select(undef,undef,undef,.5); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hash-type lookup in PDL
by andye (Curate) on Jan 05, 2007 at 18:18 UTC | |
by lin0 (Curate) on Jan 05, 2007 at 19:52 UTC | |
by andye (Curate) on Jan 06, 2007 at 18:17 UTC |