-
Notifications
You must be signed in to change notification settings - Fork 88
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
Increase float precision to increase correctness for highly nested dicts #57
base: master
Are you sure you want to change the base?
Conversation
Can you add a test please that fails on master and passes with your PR? thanks |
@fzumstein I have added tests and switched to Fraction for ensuring the code never breaks at higher depths |
Thanks, I'll try to get the original author @ericremoreynolds to have a look. I am merely the release manager ;) |
@fzumstein Thanks for the quick responses :) |
This will cause the s become huge big. Every nest will double the size of
So it's not a good idea to use fraction. Maybe you should change it to return an Enum having 'total same', 'total difference' and 'some changed'.
And when you get the result of obj_diff, you can compare |
Necessary to ensure correctness for deeply nested dicts.
Traditional float very quickly converge the similarity score to 1 for small changes at deep layers.
#56