Skip to content

Commit

Permalink
Fix test_intersections.py post cudf refactor (#1398)
Browse files Browse the repository at this point in the history
closes #1395

`pairwise_linestring_intersection`, tested in this file, returns a `cudf.Column` for one of it's arguments and used `to_pandas` to test it's output. in 24.08, the output of `Column.to_pandas` was changed to a `pandas.Index` instead of a `pandas.Series` so modified the test accordingly

Authors:
  - Matthew Roeschke (https://github.com/mroeschke)

Approvers:
  - Mark Harris (https://github.com/harrism)
  - Paul Taylor (https://github.com/trxcllnt)
  - Michael Wang (https://github.com/isVoid)

URL: #1398
  • Loading branch information
mroeschke authored Jun 7, 2024
1 parent bd974cf commit 8de055c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) 2024, NVIDIA CORPORATION.

import geopandas as gpd
import pandas as pd
from geopandas.testing import assert_geoseries_equal
Expand All @@ -13,7 +15,9 @@ def run_test(s1, s2, expect_offset, expect_geom, expect_ids):
cuspatial.from_geopandas(s1), cuspatial.from_geopandas(s2)
)

assert_series_equal(expect_offset, offset.to_pandas(), check_dtype=False)
assert_series_equal(
expect_offset, pd.Series(offset.to_pandas()), check_dtype=False
)
assert_geoseries_equal(expect_geom, geoms.to_geopandas())
assert_frame_equal(expect_ids, ids.to_pandas())

Expand Down

0 comments on commit 8de055c

Please sign in to comment.