Increase float precision to increase correctness for highly nested dicts#57
Increase float precision to increase correctness for highly nested dicts#57regalmoix wants to merge 6 commits intoxlwings:masterfrom
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