From: Robert K. <ke...@ca...> - 2002-10-07 20:01:58
|
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 ke...@ca... "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter |