NumPy and Octave (qestion and discussion)

Johann Hibschman johann at
Mon May 29 02:32:33 CEST 2000

Huaiyu Zhu writes:

> So my point is that perhaps the importance of numerical computation warrant
> an (expressional) syntax that's more convenient.  I think this can be done
> without conflict with python's general syntax.  It just need to be different
> from NumPy's special choices.

> To see why one would want this, consider an example.  Suppose one wants to
> build a learning machine that learns to play chess.  Python would be a very
> good language to write the overall structure, like players, the world, etc.
> But the actual learning algorithm (neural network, statistics, etc) needs
> lots of numerical computation which are very well expressed in matlab/
> octave.  Can this be done efficiently in python?  Right now writing these in
> NumPy is just too tedious and error-prone.

I've been using NumPy to do various problems in theoretical
astrophysics, without any problem.  In my experience, I use the
NumPy-style element-wise array combinations more often than I use
actual matrix math.  I don't mind having to write matrixmultiply the
few times I have to treat my 2D arrays as matrices.

This is clearly not your experience, but it may help you understand
why there isn't more of a groundswell of support in favor of
specializing NumPy more towards linear algebra.

Syntax helps, such as ' for transpose, will simply not happen, due to
python's general-purpose nature.  Introducing new operators will also
likely not happen.


Johann Hibschman                           johann at

More information about the Python-list mailing list