Skip to content

verify only works on sympy objects and strings, contrary to its docstring #20

@gsganden

Description

@gsganden

https://github.com/gsganden/Math-Verify/blob/main/src/math_verify/grader.py#L659 is wrong: verify(sympy.Rational(1, 3), 0.333333) returns False. The single comparisons that verify does internally (https://github.com/gsganden/Math-Verify/blob/main/src/math_verify/grader.py#L667) always return False unless either both expressions are sympy objects or both expressions are strings.

This behavior makes sense on the assumption that the inputs to verify have gone through parse. I'd suggest updating the verify docstring to state this assumption and raising an error for any non-string, non-sympy inputs.

Would you like me to create a PR with these changes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions