Stream: helpdesk (published)

Topic: Unitful.jl automatic prefix


view this post on Zulip Fons van der Plas (Nov 15 2021 at 12:12):

If I have a Unitful.jl quantity like 0.00123u"s", how can I automatically display it with the nicest looking prefix? (1.23 ms in this example)

view this post on Zulip Sebastian Pfitzner (Nov 15 2021 at 12:32):

I don't think there's a function to do that

view this post on Zulip Sebastian Pfitzner (Nov 15 2021 at 12:32):

you kinda want the inverse of the standard behaviour of upreferred

view this post on Zulip Mosè Giordano (Nov 16 2021 at 02:31):

Looking for something like https://github.com/KristofferC/TimerOutputs.jl/blob/51a5e71babc0a2115b654a3b270807a6380f4c51/src/utilities.jl?

view this post on Zulip Benoit Pasquier (Nov 16 2021 at 04:51):

There are some solutions there: https://github.com/PainterQubits/Unitful.jl/issues/240

view this post on Zulip Fredrik Bagge Carlson (Nov 16 2021 at 20:20):

There's also https://discourse.julialang.org/t/ann-human-friendly-numeric-output-numericio/5159
But appears unrelated to Unitful


Last updated: Oct 02 2023 at 04:34 UTC