Skip to content

Commit

Permalink
Better test for dask arrays.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpacemanPaul committed Jul 11, 2024
1 parent d020f21 commit 7c15b00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion odc/geo/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from affine import Affine
from numpy.polynomial.polynomial import polygrid2d, polyval2d

from ._interop import is_dask_collection
from .types import (
XY,
AnchorEnum,
Expand Down Expand Up @@ -286,7 +287,7 @@ def data_resolution_and_offset(
:returns: ``(resolution, offset)``
"""
if not isinstance(data, np.ndarray):
if is_dask_collection(data):
data = data.values

if data.size < 2:
Expand Down

0 comments on commit 7c15b00

Please sign in to comment.