@unwrap<EOL>@vectorize<EOL>def engineering(value, precision=<NUM_LIT:3>, prefix=False, prefixes=SI):
display = decimal.Context(prec=precision)<EOL>value = decimal.Decimal(value).normalize(context=display)<EOL>string = value.to_eng_string()<EOL>if prefix:<EOL><INDENT>prefixes = {e(exponent): prefix for exponent, prefix in prefixes.items()}<EOL>return replace(string, prefixes)<EOL><DEDENT>else:<EOL><INDENT>return string<EOL><DEDENT>
Convert a number to engineering notation.