diff --git a/py-polars/tests/unit/operations/map/test_map_batches.py b/py-polars/tests/unit/operations/map/test_map_batches.py index c3240ba4fb7b..774fe02742a7 100644 --- a/py-polars/tests/unit/operations/map/test_map_batches.py +++ b/py-polars/tests/unit/operations/map/test_map_batches.py @@ -40,7 +40,7 @@ def test_error_on_reducing_map() -> None: r"the input length \(6\); consider using `apply` instead" ), ): - df.group_by("id").agg(pl.map_batches(["t", "y"], np.trapz)) + df.group_by("id").agg(pl.map_batches(["t", "y"], np.trapezoid)) df = pl.DataFrame({"x": [1, 2, 3, 4], "group": [1, 2, 1, 2]}) diff --git a/py-polars/tests/unit/operations/map/test_map_groups.py b/py-polars/tests/unit/operations/map/test_map_groups.py index f41046978953..0792c0ab21da 100644 --- a/py-polars/tests/unit/operations/map/test_map_groups.py +++ b/py-polars/tests/unit/operations/map/test_map_groups.py @@ -140,7 +140,7 @@ def test_map_groups_numpy_output_3057() -> None: ) result = df.group_by("id", maintain_order=True).agg( - pl.map_groups(["y", "t"], lambda lst: np.trapz(y=lst[0], x=lst[1])).alias( + pl.map_groups(["y", "t"], lambda lst: np.trapezoid(y=lst[0], x=lst[1])).alias( "result" ) ) diff --git a/py-polars/tests/unit/test_errors.py b/py-polars/tests/unit/test_errors.py index 98b280d838a2..1efd420fdd15 100644 --- a/py-polars/tests/unit/test_errors.py +++ b/py-polars/tests/unit/test_errors.py @@ -35,7 +35,7 @@ def test_error_on_reducing_map() -> None: r"the input length \(6\); consider using `apply` instead" ), ): - df.group_by("id").agg(pl.map_batches(["t", "y"], np.trapz)) + df.group_by("id").agg(pl.map_batches(["t", "y"], np.trapezoid)) df = pl.DataFrame({"x": [1, 2, 3, 4], "group": [1, 2, 1, 2]}) with pytest.raises(