[PYTHONMAC-SIG] MacPython v1.5a4 / NumPy bugs?

W.T. Bridgman wtbridgman@radix.net
Mon, 3 Nov 1997 22:03:54 -0500


Since Jack is out of town most of this month, let me send this to the list...

I've just installed v1.5a4 on a 7300/200 running OS8.  Most of the
installation seems to function but NumPy is having problems.  I initially
had path problems but they seem to be fixed (I do still have the 1.4
version in a separate directory).

import test.autotest seems to have function as described in the README file.
The general testall.py routine generates a number of problems which I have
been unable to redirect to a file for study.

The test_all.py program fails early on with an error (text below).  I even
get errors with commands as simple as import RandomArray.

Here's a sample from test_all.py:

>array([1, 2, 3])
>array([ 1. ,  2.3,  4. ])
>array([ 1.+0.j,  0.+2.j,  3.+0.j])
>array([ 1.,  2.,  3.],'f')
>array([[ 1,  2],
>       [11, 12]])
>(2, 0)
>zeros((0,), 'l')
>array([[0, 0, 0],
>       [0, 0, 0]])
>array([[1, 1, 1],
>       [1, 1, 1]],'s')
>array([0, 2, 4, 6])
>array([ 0. ,  0.5,  1. ])
>array([1, 2, 3],'b')
>array([2, 3, 4])
>array([5, 4, 3, 2, 1, 0])
>3
>array([ 2, 12])
>array([3, 2, 1, 2, 3])
>array([[ 3,  3,  2,  2],
>       [13, 13, 12, 12]])
>array([[ 1,  2],
>       [ 3, 11],
>       [12, 13]])
>array([[0, 1, 2],
>       [3, 4, 5]])
><class ValueError at 39f2e20>: total size of new array must be unchanged
><type 'string'>
>72 53 <class ValueError at 39f2e20>: total size of new array must be
>unchanged ValueError: total size of new array must be unchanged
>Traceback (innermost last):
>  File "Macintosh HD:Development:Python v1.5:Python
>1.5a4:Extensions:NumPy:test:test_all.py", line 53, in ?
>    test_lines(fp.readlines())
>  File "Macintosh HD:Development:Python v1.5:Python
>1.5a4:Extensions:NumPy:test:test_all.py", line 26, in test_lines
>    raise ValueError, "%s doesn't match expected %s" % (last_out, line[1:-1])
>ValueError: <class ValueError at 39f2e20>: total size of new array must be
>unchanged doesn't match expected ValueError: total size of new array must
>be unchanged


and here's a simple method of inducing problems:

>Python 1.5a4 (#21, Oct 10 1997, 15:40:54)  [CW PPC w/GUSI w/MSL]
>Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>>> import RandomArray
>Traceback (innermost last):
>  File "<stdin>", line 1, in ?
>  File "Macintosh HD:Development:Python v1.5:Python
>1.5a4:Extensions:NumPy:NumPy:RandomArray.py", line 12, in ?
>    seed()
>  File "Macintosh HD:Development:Python v1.5:Python
>1.5a4:Extensions:NumPy:NumPy:RandomArray.py", line 8, in seed
>    x = int(t)
>OverflowError: float too large to convert
>>>>

The paths look okay.  It's obviously finding the libraries in the right
place but then it chokes.

Any suggestions?

Thanks,
Tom

Tom Bridgman, Ph.D.                                     wtbridgman@radix.net
Physics & Astronomy 



_______________
PYTHONMAC-SIG  - SIG on Python for the Apple Macintosh

send messages to: pythonmac-sig@python.org
administrivia to: pythonmac-sig-request@python.org
_______________