Alan G Isaac wrote: > On Tue, 12 Feb 2008, dmitrey apparently wrote: >> from numpy import * >> a = array((1.0, 2.0), float128) >> b=asfarray(a) >> type(a[0]) >> #<type 'numpy.float128'> >> type(b[0]) >> #<type 'numpy.float64'> >> __version__ >> '1.0.5.dev4767' > > > Dmitrey noted an unexpected down cast (above). > Is there a reason for it?
That's just what asfarray is designed to do. If you don't give it a dtype, it uses float64. Changing it would be a redesign of the function that may break code. The amount of code is probably minimal, so I'm only -0 on changing it. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion