set_array_print_precision

compas.numerical.set_array_print_precision(precision='2f')[source]

Changes float precision of float_formatter.

Parameters

precision (str) – Precision e.g. ‘3f’.

Returns

None

Notes

stackoverflow.com/questions/21008858/formatting-floats-in-a-numpy-array set_printoptions(formatter={‘float_kind’: float_formatter})

Examples

>>> set_array_print_precision(precision='4f')
>>> float_formatter(3.14159265359)
'+3.1416'