[PYTHON MATRIX-SIG] Where to go (was Numerical Recipes)

David Ascher da@maigret.cog.brown.edu
Sun, 20 Oct 1996 15:30:32 -0400 (EDT)


> I have some questions regarding the future of Numpy.

Indeed, quite a few.  I'm sure lots of people on this list have
different views.  Here's mine.

The Numeric module is what I think of as part of a necessary
infrastructure for building tools for use by scientists and engineers.
It is something without which Python is almost useless in this regard.
I'm eternally grateful to Jim H. (and Jim F. before him) for this great
tool.  But it's just the beginning.

> Will the numerical extension become a huge package, or is it better to
> build some more packages, wich need the numerical extension.

Numeric as a module will not grow very much, I don't think.  What will
grow is the list of modules like LinearAlgebra, FFT, RandomArray, which
all depend on arrays and ufuncs.  
 
> Is it always better, to take some routines in languages like Fortran
> or C and build a python-extension, or should the routines build in
> python. I think the last way is not so efficent but more flexibel and
> the enduser can change some things directly in the code. This is not
> so easy, if you have a mix of python and (C,Fortran).

In an ideal world, I think that writing things from scratch using the
functionality offered by arrays and ufuncs is the "right" thing to do.
The problem with that is that writing good numerical routines is an art.
Also, getting a numerical routine right takes time.  This is why I was
arguing (and I think that Paul and Konrad agree with me) that by putting
well thought-out OO wrappers around "traditional" routines, one gets the
robustness of existing tools and the friendly face (etc.) of a
class-based interface.

> How should the many evolving packages be documented? Are there any
> plans to build a help system, perhaps something like the one in the
> gist-extension? 

Good question.  I've been spending way too much of my weekend updating
the tutorial for release 1.0. It covers the "standard release", meaning
that it includes LinearAlgebra, FFT, etc.  I've switched from writing
straight HTML (yuck) to writing in TIM, Bill Janssen's TexInfo
superset (which is part of the ILU distribution, but is also available
separately).  So far, I'm quite happy with the results.  The TeX output
looks pretty good, the HTML is quite reasonable, and the plain text and
info-file outputs are nice.  The only missing output formats are one
for the Mac and one for Windows.  I suspect the latter is easier than
the former.  I might even give it a try when I have free time (ha!).

The reason why I like the 'info' format is that I've already written a
tool which allows navigation of info-files from a unix python shell.  If
anyone is interested, ask me about it (it's on my website as well).  It
allows keyword searching, so that one could do:

	>>> from ihelp import *   # that's my module's name
	>>> help('choose')        # --> will bring up the info
				  #     viewer and point at the
                                  #     'choose()' node.

 
I think the same type of help interface could pop up the Windows
helpfile viewer, or the Xinfo viewer if that's what it's configured to
do.

I think that this is a more powerful mechanism than the gist helpfile
system, which seemed to me to be less hierarchical.  I could be wrong.

Clearly this would make most sense if all Python docs were available in
a TIM-like format.  Maybe it's time to ask the DOC-SIG what's up.  The
Reference manual has been converted to FrameMaker, which might actually
allow conversion to SGML and from there TIM?  The other manuals were
last I checked available in info format (in fact it's with the library
reference in mind that I wrote the `ihelp' module, when some users were
complaining that Python had lousy help facilities compared to
matlab...).

--david

PS: I'll try and have a draft of the tutorial available (in its many
    formats =) for review in a few days.  

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

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