jiayuasu opened a new issue, #3172: URL: https://github.com/apache/sedona/issues/3172
## 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: ```text 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 ```python 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 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
