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

NaN Particles #91

Open
mauro3 opened this issue Sep 29, 2020 · 4 comments
Open

NaN Particles #91

mauro3 opened this issue Sep 29, 2020 · 4 comments

Comments

@mauro3
Copy link

mauro3 commented Sep 29, 2020

This seems inconsistent:

julia> NaN ± NaN
ERROR: ArgumentError: Normal: the condition σ >= zero(σ) is not satisfied.

julia> NaN ± Inf
Particles{Float64,2000}
 NaN ± NaN
@baggepinnen
Copy link
Owner

It comes from this

julia> std(rand(Normal(0,Inf), 10))
NaN

julia> Normal(0,NaN)
ERROR: ArgumentError: Normal: the condition σ >= zero(σ) is not satisfied.

@mauro3
Copy link
Author

mauro3 commented Sep 29, 2020

It's feels a bit "wat?", but it's ok to close this.

@baggepinnen
Copy link
Owner

Do you have an application where the semantics for infinite ra dom numbers is important? If not we can probably close this issue as I'm not sure if it makes sense to modify the behavior to give something other than nan.

@mauro3
Copy link
Author

mauro3 commented Sep 29, 2020

No, my worry was more that NaN \pm NaN errors. I got data at times which contains NaNs (arguably I should use missing) and that is how I came across this. But I can work around it. Well, it might be worth having a coherent story for 1.0.

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

No branches or pull requests

2 participants