Skip to content

Conversation

basnijholt
Copy link
Member

Fixes:

FAILED adaptive/tests/test_learners.py::test_learner_performance_is_invariant_under_scaling[LearnerND-ring_of_fire-learner_kwargs12] - DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)

and

.venv/lib/python3.13/site-packages/adaptive/learner/learner2D.py:313: in choose_point_in_triangle
    area = 0.5 * np.cross(b - a, c - a)
        if a.shape[-1] == 2 or b.shape[-1] == 2:
            # Deprecated in NumPy 2.0, 2023-09-26
>           warnings.warn(
                "Arrays of 2-dimensional vectors are deprecated. Use arrays of "
                "3-dimensional vectors instead. (deprecated in NumPy 2.0)",
                DeprecationWarning, stacklevel=2
            )
E           DeprecationWarning: Arrays of 2-dimensional vectors are deprecated. Use arrays of 3-dimensional vectors instead. (deprecated in NumPy 2.0)

@basnijholt basnijholt changed the title Fix several deprecation warnings Fix 2 NumPy deprecation warnings May 13, 2025
@basnijholt basnijholt merged commit d0aab31 into python-adaptive:main May 13, 2025
10 of 13 checks passed
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

Successfully merging this pull request may close these issues.

1 participant