PDL::Perldl2::NiceSlice(3pm)

PDL::Perldl2::NiceSlice3pm

Enable pdl niceslice syntax

Overview

This plugin enables one to use the PDL::NiceSlice syntax in an instance of "Devel::REPL" such as the new Perldl2 shell, "pdl2". Without the plugin, array slicing looks like this:

  pdl> use PDL;
  
  pdl> $x = sequence(10);
  $PDL1 = [0 1 2 3 4 5 6 7 8 9];
  
  pdl> $x->slice("2:9:2");
  $PDL1 = [2 4 6 8];

After the NiceSlice plugin has been loaded, you can use this:

  pdl> $x(2:9:2)
  $PDL1 = [2 4 6 8];

Caveats

"PDL::NiceSlice" uses Perl source preprocessing. If you need 100% pure Perl compatibility, use the slice method instead.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 7 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13

Author

Chris Marshall, "<chm at cpan dot org>"

From libpdl-perldl2-perl 2.002-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.