Skip to content

Commit

Permalink
Merge pull request #170 from opendatacube/Fix-for_issue_169
Browse files Browse the repository at this point in the history
Better focused test for dask arrays.
  • Loading branch information
SpacemanPaul authored Jul 16, 2024
2 parents c1585d3 + 7c15b00 commit aad1a61
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 aad1a61

Please sign in to comment.