From aef0da28da6516781a28eaf032dc8b18739a2bb1 Mon Sep 17 00:00:00 2001 From: Rajeev Jain Date: Thu, 23 Apr 2026 11:51:56 -0500 Subject: [PATCH] Fix default raster extent detection --- uxarray/core/dataarray.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/uxarray/core/dataarray.py b/uxarray/core/dataarray.py index f01caa3b1..b75199cc7 100644 --- a/uxarray/core/dataarray.py +++ b/uxarray/core/dataarray.py @@ -465,12 +465,7 @@ def to_raster( else: def _is_default_extent() -> bool: - # Default extents are indicated by xlim/ylim being (0, 1) - # when autoscale is still on (no extent has been explicitly set) - if not ax.get_autoscale_on(): - return False - xlim, ylim = ax.get_xlim(), ax.get_ylim() - return np.allclose(xlim, (0.0, 1.0)) and np.allclose(ylim, (0.0, 1.0)) + return ax.get_autoscale_on() if _is_default_extent(): try: