epsilon_0 simplifies incorrectly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-quantities |
Fix Released
|
Critical
|
Darren Dale |
Bug Description
quantities.
In [17]: epsilon_
Out[17]: array(8.
In [18]: constants.
Out[18]: array(8.
In [24]: constants.epsilon_0
Out[24]: UnitConstant(
In [25]: F.simplified
Out[25]: array(1.0) * s**4*A**2/(kg*m**2) # also correct...
In [26]: x = 1*F/m
In [27]: x
Out[27]: array(1.0) * F/m
In [28]: x.simplified
Out[28]: array(1.0) * s**4*A**2/(kg*m**3) # all good here
so i have no idea why it can simplify farads correctly, and farads per meter, but not when it's constants.epsilon_0
and on a side note, the ascii symbol for quantities.mu_0 reads "epsilon_0" while quantities.
In [20]: mu_0
Out[20]: UnitQuantity(
In [21]: constants.mu_0
Out[21]: UnitConstant(
Related branches
Changed in python-quantities: | |
status: | In Progress → Fix Committed |
Changed in python-quantities: | |
status: | Fix Committed → Fix Released |
Thank you for catching this. The symbol F is commonly used for both the Farad and the Faraday constant, and the Faraday constant was registering itself as F and overwriting the farad. This can't be allowed to happen, so I added a check to make sure that previously registered units can not be overwritten. It's fixed in the trunk.
I'll try to get a new release out as soon as possible.