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

Rob Managan managan@llnl.gov
Tue, 4 Nov 1997 09:35:47 -0800


Tom Bridgman wrote:
>Since Jack is out of town most of this month, let me send this to the list...
>....
>><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

I have confirmed this error. It also occurs in 1.5a3 with which Jack
included a compiled Numpy. This looks to me to be simply a change in how
exceptions are returned. The test code expected a certain error and the
format of the returned error string changed so it bombs out. It appears
that the change is in the string "<class ValueError at 39f2e20>".

I also confirmed the error with RandomArray. This comes from converting a
float that is larger than a signed integer can hold. Must be that 1.4 used
an unsigned int in this case?? This definition of seed() in RandomArray
seems to work.

def seed(x=0,y=0):
	if x == y == 0:
		import time
		t = time.time()
		x = long(t)
		y = long((t-long(t))*1000000)
	ranlib.set_seeds(x,y)


*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-
Rob Managan       mailto://managan@llnl.gov
LLNL                      ph:  510-423-0903
P.O. Box 808, L-183       FAX: 510-423-5804
Livermore, CA  94551-0808




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

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