[PYTHON MATRIX-SIG] Re: The perlDL matrix module

Jim Hugunin hugunin@mit.edu
Tue, 29 Oct 1996 17:03:43 -0500


> Well, it appears to me that perl has gotten on the bandwagon with regards
> to efficient manipulation of matrix objects:
> 
> http://www.aao.gov.au/local/www/kgb/perldl/PDL.html
....
> Do any of you perl/python cross-trainers have any insight as to relative
> value of each?  

NumPy is currently in its 1.0alpha5 release.  The alpha releases are being
restricted to members of the matrix-sig.  The first beta release will be
available publicly sometime in November and I'll announce it here then. 
Nonetheless, I just couldn't resist this one.  Here's a quick run-down of
some differences (thrown together while reading the perldl announcement). 
Note: this is from an extremely biased viewpoint.

I've always said that I thought Perl 5 was the one other language besides
Python in which something like the Numeric Extensions could be done well. 
I think that PDL is a reasonable first pass at doing just that.  Both PDL
and NumPy provide a way to efficiently work with multi-dimensional arrays
of homogeneous numbers.  The most significant difference in my mind between
the two systems is that NumPy uses Python and PDL uses Perl.

There are a lot of other differences between the two extensions, but
without spending a lot of time playing with PDL I'd be hard pressed to
provide a fair comparision.  Here's a quick summary of the obvious relative
advantages I noticed for each.

PDL's advantages:
	better syntactic sugar
		$a < 42 vs. less(a, 42)
		a += 1; a x b instead of dot(a,b)
	support for FITS and IIS

NumPy's advantages:
	supports complex numbers
	much more extensive math library
	more sophisticated structural operations: repeat, choose
	better syntax for multidimensional indexing (and more efficient)
	extensive set of modules:
		LAPACK, FFTPACK, RANLIB, GIST, PGPLOT, OpenGL, NetCDF, ...
	NumPy uses internal storage format compatible with both C and FORTRAN (I
don't know the internal storage format for PDL)
	
My two cents worth,
Jim Hugunin - author of NumPy

=================
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================