Numercal python's savespace

Helge Avlesen avle at rogn.ii.uib.no
Wed Aug 23 09:23:37 EDT 2000


I use Numerical python for computations with large arrays in single
precision, and struggle a little with avoiding the silent upcasting. 

The documentation more or less recommend using lambda functions like

real= lambda x: Numeric.array(x,'f')

a=b+ real(4.234)


I find this rather tedious, and prefer defining a and b as 

Numeric.array( (...), savespace=1)

which seem to supress silent upcasting. But is this enough to ensure
no upcasting is done?  If so, is it possible to make this the default
behaviour?  What is the recommended way to work in single precision?

-- 
Helge Avlesen
Para//ab, University of Bergen
Office:  HIB 317H1  Phone: +47 55 58 40 35  Fax: +47 55 58 41 99



More information about the Python-list mailing list