![]() |
![]()
| ![]() |
![]()
NAMEPDL - the Perl Data Language SYNOPSISuse PDL; $x = zeroes 3,3; # 3x3 matrix $y = $x + 0.1 * xvals($x) + 0.01 * yvals($x); print $y; print $y->slice(":,1"); # row 2 print $diag = $y->diagonal(0,1), "\n"; # 0 and 1 are the dimensions $diag += 100; print "AFTER, y=$y"; [ [ 0 0.1 0.2] [0.01 0.11 0.21] [0.02 0.12 0.22] ] [ [0.01 0.11 0.21] ] [0 0.11 0.22] AFTER, y= [ [ 100 0.1 0.2] [ 0.01 100.11 0.21] [ 0.02 0.12 100.22] ] 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. VECTORIZATIONFor a description of the vectorization (also called "broadcasting"), see PDL::Core. INTERACTIVE SHELLThe PDL package includes an interactive shell. You can learn about it, run "perldoc perldl", or run the shell "perldl" and type "help". 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 an ndarray with X index values... yvals Fills an ndarray with Y index values. See the CAVEAT for xvals. zvals Fills an ndarray with Z index values. See the CAVEAT for xvals. To learn more about the PDL shell, see perldl. LANGUAGE DOCUMENTATIONMost PDL documentation describes the language features. The number of PDL pages is too great to list here. The following pages offer some guidance to help you find the documentation you need.
DATA TYPESPDL comes with support for most native numeric data types available in C. 2.027 added support for C99 complex numbers. See PDL::Core, PDL::Ops and PDL::Math for details on usage and behaviour. MODULESPDL 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:
INTERNATIONALIZATIONPDL currently does not have internationalization support for its error messages although Perl itself does support i18n and locales. Some of the tests for names and strings are specific to ASCII and English. Please report any issues regarding internationalization to the perldl mailing lists. Of course, volunteers to implement this or help with the translations would be welcome. INSTALLATIONSee PDL::InstallGuide for help.
|