Copilot commented on code in PR #2405:
URL: https://github.com/apache/sedona/pull/2405#discussion_r2442787557


##########
python/sedona/spark/geopandas/geoseries.py:
##########
@@ -2450,23 +2445,18 @@ def total_bounds(self):
             warnings.filterwarnings(
                 "ignore", r"All-NaN slice encountered", RuntimeWarning
             )
-            total_bounds_df = ps_df.agg(
-                {
-                    "minx": ["min"],
-                    "miny": ["min"],
-                    "maxx": ["max"],
-                    "maxy": ["max"],
-                }
-            )
 
-            return np.array(
-                (
-                    np.nanmin(total_bounds_df["minx"]["min"]),  # minx
-                    np.nanmin(total_bounds_df["miny"]["min"]),  # miny
-                    np.nanmax(total_bounds_df["maxx"]["max"]),  # maxx
-                    np.nanmax(total_bounds_df["maxy"]["max"]),  # maxy
-                )
-            )
+            minx = ps_df["minx"].min(skipna=True)
+            miny = ps_df["miny"].min(skipna=True)
+
+            # skina=True doesn't work properly for max(), so we use dropna() 
as a workaround

Review Comment:
   Corrected spelling of 'skina' to 'skipna'.
   ```suggestion
               # skipna=True doesn't work properly for max(), so we use 
dropna() as a workaround
   ```



-- 
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]

Reply via email to