Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnitfulExt not working for logarithmic units #4700

Closed
ykonter opened this issue Mar 21, 2023 · 2 comments · Fixed by #4707
Closed

UnitfulExt not working for logarithmic units #4700

ykonter opened this issue Mar 21, 2023 · 2 comments · Fixed by #4707
Labels
bug UnitfulExt recipes for Unitful quantities

Comments

@ykonter
Copy link

ykonter commented Mar 21, 2023

UnitfulExt currently does not work for logarithmic units.
Example:

using Plots
using Unitful:m, dB, dBm
plot( (1:10)m) # works
plot( (1:10)dB ) # does not work, produces error
plot( (1:10)dBm ) # does not work, produces error

The error reads

ERROR: MethodError: no method matching isinf(::Gain{Unitful.LogInfo{:Decibel, 10, 10}, :?, Int64})
@t-bltg
Copy link
Member

t-bltg commented Mar 22, 2023

@gustaphe

@t-bltg t-bltg added bug UnitfulExt recipes for Unitful quantities labels Mar 22, 2023
@gustaphe
Copy link
Collaborator

@ykonter wrote a PR on UnitfulRecipes to fix this partially about a year ago. I don't quite remember where that landed, it's possible I got caught up in completionism and forgot to merge the parts that worked.

I can see if I can find some time to look it through this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug UnitfulExt recipes for Unitful quantities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants