pub fn py_format_fixed(x: f64, nd: usize) -> String
Python f"{x:.<nd>f}" for an arbitrary decimal count (eval’s .3f, .6f, and .0f report/gate formats).
f"{x:.<nd>f}"
.3f
.6f
.0f