8000 Floating point imprecision causes different dicts to be marked as similar if highly nested · Issue #56 · xlwings/jsondiff · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Floating point imprecision causes different dicts to be marked as similar if highly nested #56
Open
@nagrawal-eightfold

Description

@nagrawal-eightfold

Either we should migrate to integer only arithmetic OR use python decimal library to increase precision

I have a usecase where JSON schema are being marked similar if the difference is at deepest level in a fairly nested schema.

Alternatively instead of using similarity score < 1 to check for similarity we should maybe change criteria to be that returned diff is not empty?

                d, s = self._obj_diff(v, w)
                if s < 1.0:
                    changed[k] = d

i.e this code may need to change to instead check based on d instead of s

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0