Perl Data Language

From Bauman National Library
This page was last modified on 8 June 2016, at 20:11.
Perl Data Language (PDL)
Paradigm Array
Developer Karl Glazebrook, Jarle Brinchmann, Tuomas Lukka, and Christian Soeller
First appeared 1996 (1996)
License GNU General Public License, Artistic License
Website pdl.perl.org
Influenced by
APL, IDL, Perl

PDL ("Perl Data Language") gives standard Perl the ability to compactly store and speedily manipulate the large N-dimensional data arrays which are the bread and butter of scientific computing.

PDL turns Perl into a free, array-oriented, numerical language similar to (but, we believe, better than) such commercial packages as IDL and MatLab. One can write simple perl expressions to manipulate entire numerical arrays all at once. Simple interactive shells, pdl2 and perldl, are provided for use from the command line along with the PDL module for use in Perl scripts.

Description

(For the exported PDL constructor, pdl(), see PDL::Core)

PDL is the Perl Data Language, a perl extension that is designed for scientific and bulk numeric data processing and display. It extends perl's syntax and includes fully vectorized, multidimensional array handling, plus several paths for device-independent graphics output.

PDL is fast, comparable and often outperforming IDL and MATLAB in real world applications. PDL allows large N-dimensional data sets such as large images, spectra, etc to be stored efficiently and manipulated quickly.

Looking for a function

If you want to search for a function name, you should use the PDL shell along with the "help" or "apropos" command (to do a fuzzy search). For example:

 pdl> apropos xval
 xlinvals        X axis values between endpoints (see xvals).
 xlogvals        X axis values logarithmicly spaced...
 xvals           Fills a piddle with X index values...
 yvals           Fills a piddle with Y index values. See the CAVEAT for xvals.
 zvals           Fills a piddle with Z index values. See the CAVEAT for xvals.

Modules

PDL includes about a dozen perl modules that form the core of the language, plus additional modules that add further functionality. The perl module "PDL" loads all of the core modules automatically, making their functions available in the current perl namespace. Some notes:

Modules loaded by default See the SYNOPSIS section at the end of this document for a list of modules loaded by default.

PDL::Lite and PDL::LiteF These are lighter-weight alternatives to the standard PDL module. Consider using these modules if startup time becomes an issue.

Exports use PDL; exports a large number of routines into the calling namespace. If you want to avoid namespace pollution, you must instead use PDL::Lite, and include any additional modules explicitly.

PDL::NiceSlice Note that the PDL::NiceSlice syntax is NOT automatically loaded by use PDL;. If you want to use the extended slicing syntax in a standalone script, you must also say use PDL::NiceSlice;.

PDL::Math The PDL::Math module has been added to the list of modules for versions later than 2.3.1. Note that PDL::Math is still not included in the PDL::Lite and PDL::LiteF start-up modules.

External links