You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unitful.jl is a nice library which allows type inference over physical units making unit conversion errors less likely.
I tried the following:
circ = @circuit begin
j_in = voltagesource(9u"V")
j_out = voltageprobe()
j_in[+] == j_out[+]
j_in[-] == j_out[-]
end
Currently i am getting a ERROR: DimensionError: and V are not dimensionally compatible.
You might want to look into Unitful and whether supporting it makes sense for you.
The text was updated successfully, but these errors were encountered:
Agree this would be super nice to support. Unfortunately it's not just writing the code in a way that just happens to work with unitful numbers. Internally, it's quite likely that quantities of different units are collected in the same vector, but for performance, we definitely want that vector elements to be concretely typed, so that leaves dimensionless as best option internally.
The surface, however, would definitely benefit from supporting units. It's just that I'm reluctant to add dependencies. But if we get something like JuliaLang/Pkg.jl#1285 eventually, I'd definitely like to add Unitful as an optional dependency.
Will also note that supporting Unitful APIs makes life much easier to get started. Have lost weeks of work putting the wrong unit into a complex program I did not understand.
Unitful.jl is a nice library which allows type inference over physical units making unit conversion errors less likely.
I tried the following:
Currently i am getting a
ERROR: DimensionError: and V are not dimensionally compatible.
You might want to look into Unitful and whether supporting it makes sense for you.
The text was updated successfully, but these errors were encountered: