Expected behavior
sedona.spark.geopandas.GeoSeries.skew should accept integer boolean-like values for use_radians, matching GeoPandas 1.1.3 and the existing GeoSeries.orient_polygons flag behavior.
For example, use_radians=1 and use_radians=np.int64(1) should be treated as true.
Actual behavior
Sedona rejects both values:
TypeError: 'use_radians' must be a boolean
The implementation accepts only bool and np.bool_, while GeoPandas evaluates this flag by truthiness.
Steps to reproduce the problem
import geopandas as gpd
import numpy as np
from shapely.geometry import Polygon
from sedona.spark.geopandas import GeoSeries
polygon = Polygon([(0, 0), (0, 1), (1, 0), (0, 0)])
# Both calls succeed.
gpd.GeoSeries([polygon]).skew(xs=0.1, use_radians=1)
gpd.GeoSeries([polygon]).skew(xs=0.1, use_radians=np.int64(1))
# Both calls raise TypeError.
GeoSeries([polygon]).skew(xs=0.1, use_radians=1)
GeoSeries([polygon]).skew(xs=0.1, use_radians=np.int64(1))
Settings
Sedona version = 1.9.1-SNAPSHOT
Apache Spark version = 3.4
Apache Flink version = N/A
API type = Python
Scala version = 2.12
JRE version = 17
Python version = 3.12
Environment = Standalone
GeoPandas version = 1.1.3
Shapely version = 2.1.2
Expected behavior
sedona.spark.geopandas.GeoSeries.skewshould accept integer boolean-like values foruse_radians, matching GeoPandas 1.1.3 and the existingGeoSeries.orient_polygonsflag behavior.For example,
use_radians=1anduse_radians=np.int64(1)should be treated as true.Actual behavior
Sedona rejects both values:
The implementation accepts only
boolandnp.bool_, while GeoPandas evaluates this flag by truthiness.Steps to reproduce the problem
Settings
Sedona version = 1.9.1-SNAPSHOT
Apache Spark version = 3.4
Apache Flink version = N/A
API type = Python
Scala version = 2.12
JRE version = 17
Python version = 3.12
Environment = Standalone
GeoPandas version = 1.1.3
Shapely version = 2.1.2