Physical-type correctness in scientific Python
The representation of units and dimensions in informatics systems is barely codified and often ignored. For instance, the major languages used in scientific computing (Fortran, C and Python), have no type for dimension or unit, and so physical quantities are represented in a program by variables of type real, resulting in the possibility of unit or dimensional errors. We demonstrate the limitations of two Python unit-libraries and present a justification and method for checking kind-of-quantity.
READ FULL TEXT