From: Leonardo M. <lm...@ud...> - 2004-02-02 16:18:33
|
Hi All > pyfits and PyRAF use numarray instead of Numeric, so I have used > Gnuplot.py with numarray.array inputs for more than half a year. > Everything seems to work fine. I think numarray tries to be > backward compatible with Numeric. Yes, and moreover, there is a list of differences between the two here: http://www.stsci.edu/resources/software_hardware/numarray/userguide It seems like the differences should not affect Gnuplot.py, but this is a question for Michael perhaps. Howabout a condicional import in the relevant modules? (funcutils, etc) Something like: #### try: import Numarray as numeric_lib except: import Numeric as numeric_lib #### And then all internal references are made to "numeric_lib", for instance return numeric_lib.asarray(m, Numeric.Float32) I think it is fare to assume that the user will prefer Numarray if installed, and I also think that Numeric will be around for a loooong time. Sounds reasonable ? Best Leo |