Skip to content

Form factor calculations are not numerically stable #213

Open
@comcon1

Description

@comcon1

You can see the discrepancy if you install numpy-2.x, and then run in unit tests:

pytest -vs test_analyze.py::test_analyze_ff

When calculated JSON is compared to PRE-calculated one, the difference is quite big - sometimes more than 1%. It has probably almost no scientific impact, but it is suspicious and I would not leave the code as it was. For the comparison: error in OP values is less than 1e-6. Now it leads to the fail of unit-tests when using numpy-2.x, and I would say that it is correct. Probably it can trigger fail in other build environments, but I hasn't seen yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions