Is there a way to limit the representation of floating point numbers so that they correspond only to the prefixes used in physical units.
An example will make it clearer:
0.01 -> currently 1e-02
-> what I'd like 10e-03
0.0001 -> currently 1e-04
-> what I'd like 100e-06
The motivation behind it is that I'm doing some time measurements and having the representations as representations of 1000 is much more user friendly. I know that 10e-03 -> 10mili
or 100e-06 -> 100u
Update
For numpy 1.7< there is a formatter
attribute in the set_printoptions()
. The solution for which I'm heading for is writing an inline function which would do the formating.
Once set, it the formatting should be available globally.