Autoscaling units¶
Using the autoscale
method, quantities can be automatically scaled:
>>> a = 1e-3 m
>>> a.autoscale
\(1.0 \text{mm}\)
>>> a = 0.0003 s
>>> a.autoscale
\(300.0 \text{µs}\)
>>> a = 1.0m
>>> a.autoscale
\(1.0 \text{m}\)
>>> %precision 2
>>> a = 3e-9 F
>>> a.autoscale
\(3.00 \text{nF}\)