From: Sebastian H. <ha...@ms...> - 2003-03-07 20:15:49
|
Hi, I am just looking into numarray.fromfuntion. I have e.g. this: def func(x,y,z): return 1.2*(x+y+z) a = na.fromfunction(func, (nz,ny,nx)) b = a.astype(na.Float32) Is there a way to tell fromfunction to _directly_ generate a Float32 typed array. As I see it only "standard" Python type are possible now. Or: Is there a scalar conversion function like numarray.Float32( 3.141 ) ? Thanks, Sebastian Haase |