Skip to content

Commit 8f8f634

Browse files
authored
Fix default raster extent detection (#1498)
1 parent f1b1703 commit 8f8f634

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

uxarray/core/dataarray.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -465,12 +465,7 @@ def to_raster(
465465
else:
466466

467467
def _is_default_extent() -> bool:
468-
# Default extents are indicated by xlim/ylim being (0, 1)
469-
# when autoscale is still on (no extent has been explicitly set)
470-
if not ax.get_autoscale_on():
471-
return False
472-
xlim, ylim = ax.get_xlim(), ax.get_ylim()
473-
return np.allclose(xlim, (0.0, 1.0)) and np.allclose(ylim, (0.0, 1.0))
468+
return ax.get_autoscale_on()
474469

475470
if _is_default_extent():
476471
try:

0 commit comments

Comments
 (0)