7 Oct
2002
7 Oct
'02
1:02 p.m.
On Mon, Oct 07, 2002 at 11:56:48AM -0700, Andrew P. Lentvorski wrote:
However, I have *lots* of these functions scattered around the code (inherited from someone else), so I will have to hunt them all down and change all the int(thingtoconvert) to thingtoconvert.astype('l').
How about defining a function like so: def int(object, **kwds): if type(object) is Numeric.ArrayType: return object.astype(Numeric.Integer) else: return __builtins__.int(object, **kwds) That should probably take care of all uses of int() in your code. -- Robert Kern Ruddock House President kern@caltech.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter