[PYTHON MATRIX-SIG] Numeric Python Beta 1 Released!
Konrad Hinsen
hinsen@ibs.ibs.fr
Sun, 23 Feb 1997 10:32:55 +0100
> I kept saying it was going to happen any day now...today's that day.
And it partly ruined my day, since of course I couldn't resist installing
and testing the new version immediately, although I had only come to
start a calculation job :-(
So far for the first complaint ;-)
> Check out http://www.sls.lcs.mit.edu/~jjh/numpy for the first beta release
> of NumPy. It includes a source distribution that will work under both
> windows and unix, and an easy to install binary for Win NT/95. Grab it,
> install it, and let me know what you think (feel free to comment on the web
> pages as well...).
The Web page is fine, I didn't expect such a luxury! Maybe you should add
pointers to code based on NumPy; I'll start immodestly by proposing my
own:
http://yi.com/home/HinsenKonrad/python.html
http://yi.com/home/HinsenKonrad/netcdf.html
Other stuff that comes to mind is the full LAPACK interface and the Gist
interface.
> Unix installation instructions need work, more info for different OS's
I corrected the installation instructions for the first choice
(installation in the Python source tree); I'll send the new version
around to everyone so that others can check whether it's OK for them.
I did not try the second choice, but I strongly suspect that the
instructions are incomplete. The shared libraries will end up in
NumPy, whereas the Python modules are in NumPy/NumPy. So *both*
directories must be added to PYTHONPATH, or one or the other set of
files must be copied. Personally I'd prefer to copy some files rather
than mess up my PYTHONPATH needlessly, but I'd rather let the people
who use it decide.
I remember some reports about problems with the second installation
method on some machines due to the shared library libnumpymodule.
That ought to be mentioned somewhere with a list of affected machines.
> Bug fixes (all known bugs are squashed in this release...)
I found only one trivial bug in the new release: test/test_all.py
fails under Unix with a syntax error because of the CRs in the file
test_items.py. They should be removed.
There have been a couple of bugs in LinearAlgebra.py for a while,
which I have corrected in the course of time, but never sent to
anyone. I have now done some superficial test of all functions, and
I'll send the fixed file plus my "test suite" around to everyone - it
would be good to have this tested on other machines as well.
I'll try to improve some functions later, but that won't change the
interface, so it's not urgent.
> questions about the system to the matrix-sig. I fear that I've lost many
> of the comments sent to me over the last five months due to a period of
> immense disorganization in my life. I'm now much better set up to collect
> bug reports and feature suggestions, so if I haven't addressed your
> comments in this latest release, please send them to me again.
I still think that it would be better to give Numeric.dot() the
functionality of Numeric.matrixmultiply() and remove the latter (or
keep it for compatibility, but not document it). There is no need for
two functions, and many people will probably use dot() although what
they need is matrixmultiply().
I also still think that the generalized version of diagonal() and trace()
that I posted a while ago would be more suitable than the current
version that works only on rank-2 arrays. Here's my version again:
------------------------------------------------------------
def diagonal(a, axis1=0, axis2=1, offset=0):
a = array(a)
if axis2 < axis1: axis1, axis2 = axis2, axis1
if axis2 > 1:
new_axes = range(len(a.shape))
del new_axes[axis2]; del new_axes[axis1]
new_axes[0:0] = [axis1, axis2]
a = transpose(a, new_axes)
s = a.shape
n1 = s[0]
n2 = s[1]
n = n1*n2
s = (n,) + s[2:]
a = reshape(a, s)
if offset < 0: offset = n2-offset-1
return take(a, arange(offset, n, n2+1), 0)
def trace(a, axis1=0, axis2=1, offset=0):
return add.reduce(diagonal(a, axis1, axis2, offset))
------------------------------------------------------------
That's it for now, more complaints later ;-)
Konrad.
--
-------------------------------------------------------------------------------
Konrad Hinsen | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire | Tel.: +33-4.76.88.99.28
Institut de Biologie Structurale | Fax: +33-4.76.88.54.94
41, av. des Martyrs | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France | Nederlands/Francais
-------------------------------------------------------------------------------
_______________
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________