Skip to content

Ill-conditioned pinv test scales its tolerance from the observed error #457

Closed

Description

@cursor

tests/test_pinv.py sets adaptive_tol = max(1e-8, max_diff * 5) and then asserts allclose at that tolerance. The bound is derived from the error it is supposed to check, so the assertion passes for any finite difference.

Replace it with a fixed tolerance justified by MATLAB pinv's singular-value cutoff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions