questions about array types
Rereading the numeric docs I see the reference to types Float, Float32, Float64 -- which make sense, however I am curious to understand the usefulness of types Float0, Float8 and Float16 which all seem synonyms for Float32. Was there some thinking that there would be a converter written for 8bit floats?
from Numeric import * a = array([1,2,3,4],Float32) fromstring(a.tostring(),Float32) array([ 1., 2., 3., 4.],'f') fromstring(a.tostring(),Float) array([ 2.00000047, 512.00012255]) # corrupt, as would be expected fromstring(a.tostring(),Float0) #seems to convert back as if Float0 == Float32 array([ 1., 2., 3., 4.],'f') fromstring(a.tostring(),Float8) array([ 1., 2., 3., 4.],'f') fromstring(a.tostring(),Float16) array([ 1., 2., 3., 4.],'f')
participants (1)
-
eric hagemann