NumericIO.jl icon indicating copy to clipboard operation
NumericIO.jl copied to clipboard

Compatibility with SIUnits.jl

Open fbruetting opened this issue 8 years ago • 3 comments
trafficstars

Please make your code compatible with https://github.com/Keno/SIUnits.jl that would be great!

fbruetting avatar Dec 20 '16 17:12 fbruetting

That question was a bit vague to me until I read the issue you opened in SIUnits.

As far as I know: NumericIO is not incompatible with SIUnits in any way. I think SIUnits would simply have to make use of NumericIO.

I suppose both could be merged into a single package: NumericIO's functionality is relatively simple - it might not really deserve to be its own package... but I find convincing people to adopt my solutions can be difficult at times. As a comment: NumericIO could also probably be integrated into with https://github.com/JuliaGraphics/Showoff.jl.

ma-laforge avatar Dec 22 '16 03:12 ma-laforge

I just added a section: https://github.com/ma-laforge/NumericIO.jl/blob/master/README.md#Sample_Applications

To get things working with SIUnits.jl, you could add something similar to the following to your ~/.juliarc.jl file:

using NumericIO
Base.show(io::IOContext{Base.Terminals.TTYTerminal}, v::Float64) = print(formatted(io, :SI, ndigits=4), v)

Again, this is not really recommended. You are changing the behaviour of some relatively low-level functions.

ma-laforge avatar Jan 02 '17 18:01 ma-laforge

Sorry for digging this up, but wanted to link this issue to that one on Unitful.jl: https://github.com/PainterQubits/Unitful.jl/issues/240, in case someone wants to add the functionality here into Unitful.jl.

briochemc avatar Nov 16 '21 22:11 briochemc