Hi All,

I'm trying to use sympy for units conversion..

 

I use this code to convert from ft to mm..

cad_leng=units.Unit('cad_leng','mm')

converter={units.m: cad_leng*Rational(1000)}

cad_ft=units.ft

cad_mm=cad_ft.subs(converter)

mm_value=float(str(cad_mm.evalf()).split('*')[0])

 

print mm_value

304.8

 

Is this right ?

Or there are any other method to get it ?

 

Regards,

Matteo

 

 

 

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sy...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to