Skip to content

NumPy 2.0 deprecation: np.cross on 2-D vectors in geo.py #773

Closed

Description

@cvanelteren

When hawkeye overview connectors are drawn, the _segments_intersect helper in ultraplot/axes/geo.py calls np.cross(point1 - origin, point2 - origin) on 2-D vectors, which triggers DeprecationWarning: Arrays of 2-dimensional vectors are deprecated. Use arrays of 3-dimensional vectors instead. under NumPy 2.0 (reproducible via ultraplot/tests/test_inset.py). Since NumPy will eventually remove 2-D np.cross support, this will break. It should be fixed by computing the scalar 2-D cross product directly as a[0]*b[1] - a[1]*b[0] instead of relying on np.cross.

Activity

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

      ⌂ Proxy