[PYTHON MATRIX-SIG] More naming/module issues

Ken Manheimer klm@CNRI.Reston.Va.US
Fri, 6 Sep 1996 13:36:29 -0400 (EDT)


On Fri, 6 Sep 1996, Paul F. Dubois wrote:

> As elegant as it sounds, Numeric.LinearAlgebra is redundant. There is no
> un-Numeric LinearAlgebra unless Python suddenly supports symbolic
> computation.

"No one expects the spanish inquisition."

Python is suddenly supporting advance numeric computation, why shouldn't
it, eventually, suddenly support symbolic algebra?  'import
mathematicb.LinearAlgebra' (Mathematicb would be like mathematica, but
Better:-)

(I have to confess, i may be overly dedicated to tree-structuring the
Python modules namespace.  I have the feeling, though, that it would be
much easier for everyone to get a handle on what's available if
fundamentally related stuff were collected together in packages.  I'm
nearly sure we'd get fewer question in the newsgroup seeking cgi and
http tools if the web stuff were gathered together in a package.) 

If that doesn't grab you, consider another benefit of the nesting -
someone looking for the numeric-related item, that they knew they'd seen
around, looks in the Numeric package for it, rather than having to
browse through the the entire collection of python packages.

> On the other hand, I see the virtue of having a tree-like path to find
> stuff in that great big catalog of the future. Say,
> LinearAlgebra.LAPACK 
> LinearAlgebra.NAG
> LinearAlgebra.Sparselib
> FFT.FFTPACK
> FFT.IMSL
> FFT.NAG

Yes.  I'd like to go the one step further, and put it all in Numeric. 

And if you're concerned about seeing something like the following
crowding your code:

	Numeric.LinearAlgebra.SparseLib.array((1, 1), (1e6, 2), (1e12, 3))

you could do:

from Numeric.LinearAlgebra import SparseLib
[...]
	SparseLib.array((1, 1), (1e6, 2), (1e12, 3))

I believe this will work the current implementation of ni.

> I don't understand the implications of the package nesting, however. One
> wouldn't want to load all of the LinearAlgebra children just because you
> wanted one of them.

As guido indicated, only the specified components are loaded.


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

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