Trouble installing MatPy

Chad Netzer cnetzer at mail.arc.nasa.gov
Thu Feb 20 16:20:09 EST 2003


On Thu, 2003-02-20 at 05:00, ananth wrote:
> Chad,

> After doing what u prescribed, here is what happens:
> 
> Traceback (most recent call last):
>   File "C:\Python22\Lib\MatPy\tests\test_all.py", line 8, in ?
>     from MatPy.tests import __all__
>   File "C:\Python22\lib\site-packages\MatPy\__init__.py", line 39, in
> ?
> OverflowError: (34, 'Result too large')

Ahh, well at least you are now running the MatPy code.  However, you
have run into a bug/misfeature in the most recent released version in
that it attempts to use 1e300**2 to produce an "inf" object.  However,
Python handling of the power operator has changed (since 2.1?), so that
that now produces an OverflowError.

Change the line in __init__.py from:

Inf = inf = 1e300**2

to:

Inf = inf = 1e300*1e300

And that error should go away.  This change is directly from the CVS
version (which is newer than what you have, but has not yet been
released as a new version).  You could try getting the CVS MatPy (email
me privately and I can get it for you, if you don't know how)

For what it is worth, I messed with MatPy for a short while, and found a
number of small problems which I didn't have time to track down (one was
that vector results were inconsistently converted to row or column
vectors, based on the whim of the MLab.dot() function that it relies
upon).  You should perhaps try to contact the author to see how much
time he now has to devote to testing and fixing it.  I thought it had a
LOT of potential (since there is still a lack of a good Matrix/Vector
class for Python), but I eneded up not being able to track down the
problem due to lack of time, and other projects.

You could also look into SciPy, which I believe has a Matrix class (as
well as Numeric itself).  What kind of operations exactly are you
needing the Matrix class for?


> ImportError: No module named test_basic

This may or may not be related to the above problems.  Fix that one
first and see if this one persists.

-- 
Bay Area Python Interest Group - http://www.baypiggies.net/

Chad Netzer
(any opinion expressed is my own and not NASA's or my employer's)







More information about the Python-list mailing list