-
Notifications
You must be signed in to change notification settings - Fork 84
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
Marginal/Categorical incorrectly merge some values due to use of JSON.stringify #179
Comments
This is only one of a number of issues arising from the use of JSON.stringify: For example, this returns an ERP with probability 1 on
|
Also see #108. |
Maybe we should use Map? |
I was thinking that. One potential snag is the way it compares keys - I suspect this means it doesn't help with #108 for example. (And I don't think this is something which can be customized yet.) If we care about #108 perhaps we could extend |
Only identical objects are considered equal, so I think it would be problematic for stuff which currently works. |
Right. I think what we want is a hash table that uses |
At present:
Enumerate(function() { flip(0.5) ? -Infinity : Infinity }).support(); === [ -Infinity ]
Rather than
[ -Infinity, Infinity]
.This happens because in building the histogram
JSON.stringify(Infinity) === JSON.stringify(-Infinity) === 'null'
.See discussion here.
The text was updated successfully, but these errors were encountered: