[Pythonmac-SIG] Bug in Numeric?

Chris Lee cjl@physics.otago.ac.nz
Fri, 13 Sep 2002 16:20:10 +1200


Hi
I am doing the following

 >>> import Numeric
 >>> t = open("Macintosh HD:Users:cjl:Desktop:100902teu:00")
 >>> g = t.read()
 >>> g = Numeric.reshape(g,(512,512))
Up to here everything goes allright.  I have imported my file of raw 
data which is simply a bunch of values between 0 and 255.  g is a matrix 
with type 'c'
I want to convert this to integer values so I try the stupid approach

 >>> h = Numeric.array(g, 'I')

following which MacPython hard crashes...
So a) is this a bug?
b) How do I convert my array in a sensible way?

Cheers
Chris
#################################
Chris Lee
Physics Department
Otago University
PO Box 56
Dunedin
New Zealand
Phone ++64 3 479 7749
Fax ++64 3 479 0964
#################################