Skip to content

Commit 21b7f0b

Browse files
authored
Fixed deprec warning
1 parent a1b90b9 commit 21b7f0b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/spatialdata_plot/pl/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from matplotlib.gridspec import GridSpec
2626
from matplotlib_scalebar.scalebar import ScaleBar
2727
from numpy.random import default_rng
28-
from pandas.api.types import CategoricalDtype, is_categorical_dtype
28+
from pandas.apis import CategoricalDtype, is_categorical_dtype
2929
from scanpy import settings
3030
from scanpy.plotting._tools.scatterplots import _add_categorical_legend
3131
from scanpy.plotting.palettes import default_20, default_28, default_102
@@ -254,10 +254,10 @@ def get_point_bb(
254254

255255
# Split by Point and Polygon:
256256
tmp_points = sdata.shapes[element_id][
257-
sdata.shapes[element_id]["geometry"].apply(lambda geom: geom.type == "Point")
257+
sdata.shapes[element_id]["geometry"].apply(lambda geom: geom.geom_type == "Point")
258258
]
259259
tmp_polygons = sdata.shapes[element_id][
260-
sdata.shapes[element_id]["geometry"].apply(lambda geom: geom.type == "Polygon")
260+
sdata.shapes[element_id]["geometry"].apply(lambda geom: geom.geom_type == "Polygon")
261261
]
262262

263263
if not tmp_points.empty:

0 commit comments

Comments
 (0)