-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Variance with Unitful values #206
Comments
Hmm,
This is fixed on OnlineStatsBase master, along with a few other things like making
|
That was quick! Thank you! |
You're welcome! Big caveat: you need to use |
Just kidding, I made it smarter. |
Is it possible to use
OnlineStats
to calculate the Variance of values with units usingUnitful
?I tried to define the type for the
Variance
, but neither the type of the unitful value nor the square of it works:It works for the
Mean
:I would guess that the reason is that Unitful defines the neutral element for multiplication (
one
) of a unitful number as1
without any unit. Which is correct. HoweverVariance
seems to initialize itself using this value and therefore does not get the right units? It seems to "forget" the units after creation:The text was updated successfully, but these errors were encountered: