Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_math_util_length_domain fails on CPython 3.13 #285

Open
hombit opened this issue Dec 12, 2024 · 0 comments
Open

test_math_util_length_domain fails on CPython 3.13 #285

hombit opened this issue Dec 12, 2024 · 0 comments

Comments

@hombit
Copy link

hombit commented Dec 12, 2024

> python3.13 -m pytest spherical_geometry/tests/test_basic.py -k test_math_util_length_domain
spherical_geometry/tests/test_basic.py F                                 [100%]

=================================== FAILURES ===================================
_________________________ test_math_util_length_domain _________________________
ValueError: Out of domain for acos

The above exception was the direct cause of the following exception:

    def test_math_util_length_domain():
        with pytest.raises(ValueError):
>           great_circle_arc.length([[np.nan, 0, 0]], [[0, 0, np.inf]])

spherical_geometry/tests/test_basic.py:533:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

A = [[nan, 0, 0]], B = [[0, 0, inf]]

    def length(A, B):
        r"""
        Returns the angular distance between two points (in vector space)
        on the unit sphere.

        Parameters
        ----------
        A, B : (*x*, *y*, *z*) triples or Nx3 arrays of triples
           The endpoints of the great circle arc, in vector space.

        Returns
        -------
        length : scalar or array of scalars
            The angular length of the great circle arc in radians.

        Notes
        -----
        The length is computed using the following:

        .. math::

           \Delta = \arccos(A \cdot B)
        """
        if HAS_C_UFUNCS:
>           result = math_util.length(A, B)
E           SystemError: <class 'RuntimeWarning'> returned a result with an exception set

spherical_geometry/great_circle_arc.py:210: SystemError
=========================== short test summary info ============================
FAILED spherical_geometry/tests/test_basic.py::test_math_util_length_domain - SystemError: <class 'RuntimeWarning'> returned a result with an exception set
======================= 1 failed, 31 deselected in 0.05s =======================

All tests pass on 3.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant