{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaStats/Distributions.jl/issues/696","repository_url":"https://api.github.com/repos/JuliaStats/Distributions.jl","labels_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/issues/696/labels{/name}","comments_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/issues/696/comments","events_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/issues/696/events","html_url":"https://github.com/JuliaStats/Distributions.jl/issues/696","id":282292261,"node_id":"MDU6SXNzdWUyODIyOTIyNjE=","number":696,"title":"Behaviour of \"==\" operator","user":{"login":"v-i-s-h","id":7954412,"node_id":"MDQ6VXNlcjc5NTQ0MTI=","avatar_url":"https://avatars1.githubusercontent.com/u/7954412?v=4","gravatar_id":"","url":"https://api.github.com/users/v-i-s-h","html_url":"https://github.com/v-i-s-h","followers_url":"https://api.github.com/users/v-i-s-h/followers","following_url":"https://api.github.com/users/v-i-s-h/following{/other_user}","gists_url":"https://api.github.com/users/v-i-s-h/gists{/gist_id}","starred_url":"https://api.github.com/users/v-i-s-h/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/v-i-s-h/subscriptions","organizations_url":"https://api.github.com/users/v-i-s-h/orgs","repos_url":"https://api.github.com/users/v-i-s-h/repos","events_url":"https://api.github.com/users/v-i-s-h/events{/privacy}","received_events_url":"https://api.github.com/users/v-i-s-h/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-12-15T01:25:54Z","updated_at":"2018-09-19T14:39:45Z","closed_at":null,"author_association":"NONE","body":"I want to compare two distributions. For some distributions, '==' is working. For some, it fails\r\n\r\n```\r\njulia> d1 = Distributions.Categorical( [0.25,0.25,0.50] )\r\nDistributions.Categorical{Float64}(K=3, p=[0.25, 0.25, 0.5])\r\n\r\njulia> d1 == Distributions.Categorical( [0.25,0.25,0.50] )  # **FAILS **\r\nfalse\r\n\r\njulia> d2 = Distributions.Beta( 2, 3 )\r\nDistributions.Beta{Float64}(α=2.0, β=3.0)\r\n\r\njulia> d2 == Distributions.Beta( 2, 3 )\r\ntrue\r\n\r\njulia> d3 = Distributions.Normal(1.0,2.0)\r\nDistributions.Normal{Float64}(μ=1.0, σ=2.0)\r\n\r\njulia> d3 == Distributions.Normal(1.0,2.0)\r\ntrue\r\n```\r\n\r\nIs this the correct behavior?"},"comment":{"url":"https://api.github.com/repos/JuliaStats/Distributions.jl/issues/comments/422829573","html_url":"https://github.com/JuliaStats/Distributions.jl/issues/696#issuecomment-422829573","issue_url":"https://api.github.com/repos/JuliaStats/Distributions.jl/issues/696","id":422829573,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjgyOTU3Mw==","user":{"login":"matbesancon","id":7623090,"node_id":"MDQ6VXNlcjc2MjMwOTA=","avatar_url":"https://avatars2.githubusercontent.com/u/7623090?v=4","gravatar_id":"","url":"https://api.github.com/users/matbesancon","html_url":"https://github.com/matbesancon","followers_url":"https://api.github.com/users/matbesancon/followers","following_url":"https://api.github.com/users/matbesancon/following{/other_user}","gists_url":"https://api.github.com/users/matbesancon/gists{/gist_id}","starred_url":"https://api.github.com/users/matbesancon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matbesancon/subscriptions","organizations_url":"https://api.github.com/users/matbesancon/orgs","repos_url":"https://api.github.com/users/matbesancon/repos","events_url":"https://api.github.com/users/matbesancon/events{/privacy}","received_events_url":"https://api.github.com/users/matbesancon/received_events","type":"User","site_admin":false},"created_at":"2018-09-19T14:39:45Z","updated_at":"2018-09-19T14:39:45Z","author_association":"CONTRIBUTOR","body":"Given that comparing Distributions will often require comparing floating point numbers, I would suggest \r\n`isapprox` aka `≈` for this"}}
{"actor":{"display_login":"matbesancon"}}