We currently have bunch of fundemental physical constants defined in
sympy/physics/units.py in the following form:
...
c = speed_of_light = 299792458 * m/s
G = gravitational_constant = Rational('6.67428') * ten**-11 * m**3 /
kg / s**2
u0 = magnetic_constant = 4*pi * ten**-7 * N/A**2
e0 = electric_constant = 1/(u0 * c**2)
Z0 = vacuum_impedance = u0 * c
...
In my opinion this pollutes namespace and doesn't look elegant at all
and will certainly introduce many problems when we start defining more
of them.. :P
My proposal:
from physics.constants import constant
# Speed of light (without the m/s)
print constant("c", units=False)
The same approach could be used with also measurement units (plus the
possibility that they could be defined using the fundamental
constants :) )
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sympy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---