[PYTHON MATRIX-SIG] More naming/module issues

Michael McLay mclay@eeel.nist.gov
Fri, 6 Sep 1996 09:03:47 GMT


Konrad Hinsen writes:
 > > Now I'm working out the standard library.  My questions is: How many
 > > modules should I make and what should they be called?
 > 
 > My preference is:
 > 
 > > 3) Add them to seperate modules:
 > > 	Lapack.inverse(matrix), Fftpack.fft(waveform), Ranlib.random(100)
 > 
 > However, I'd prefer other names for the modules, and maybe also a
 > somewhat wider scope. For example, I'd like to have one module for
 > linear algebra. The standard version would contain the LAPACK
 > interface, but conceivable someone else could write a compatible
 > version using a special Cray library or whatever. There could also be
 > other functions (added later) that are not part of LAPACK. Therefore
 > the module should not be *called* LAPACK, but LinearAlgebra.

I agree that new names should be used.  I propose the following convention 
be followed so the library that is created makes it easy to find
general resources, but still retain the ease of use of short hand
notations.

The names selected for modules,classes, and functions should be
spelled out in full for a general package called Numeric.

	Numeric.LinearAlgebra
	Numeric.FourierTransform
	Numeric.RandomNumbers

I dropped the term Fast from FourierTransform because it seems obvious
that you would want to do it fast and I don't recall ever hearing
about anyone using something other than an FFT.  The nature of the
algorithm used could be incorporated into a docstring, rather than
encoded in the name.

Each discipline can now import the fully spelled out name and
shorten it so it fits the conventional notation for that industry.  
For instance ComputationalChemistry.fft module might contain the line:

	from Numeric.FourierTransform import *
	fft = FourierTransform
	fft2d = FourierTransform2D

This notation will make it easier for new users to grasp the
organization of the language and the library.  Using names like LAPACK
is not intuitive to a new student.  It will become even less intuitive
as high level language take over in the role of teaching linear
algebra.


Michael

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

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