[Matrix-SIG] Proposal for further single-precision clean-up.

Joe Van Andel vanandel@ucar.edu
Tue, 18 Jan 2000 09:12:22 -0700

Travis: you asked for examples of the 'single precision problem'.  

I am also working with huge arrays of single precision variables.  I
really can not afford the extra memory to have any intermediate
calculations stored in double precision.  I use statements like:

summedOutput = SameSizeAs(weight[i],out)*out

# from David Ascher's Numeric Python Tutorial
def SameSizeAs(input, ref):
    return Numeric.array(input, ref.typecode())

This is pretty ugly and not at all intuitive.  I'm glad that I can "get
by" with this solution in the short term, but I certainly hope that
Numeric Python can be changed to make this sort of kludge unnecessary. 
These sort of kludges  are  barrier to understanding the code and tends
to prevent other scientists and programmers from adopting Numeric

Having passive casting be a (default) option for Numeric arrays sounds
like a fine solution.

Joe VanAndel  	          
National Center for Atmospheric Research
Internet: vanandel@ucar.edu