Skip to content

Commit 5c0740a

Browse files
committed
fixed the equal_interval dask numpy case to call compute() on the nanmax and nanmin functions.
1 parent a706927 commit 5c0740a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

xrspatial/classify.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,10 +739,15 @@ def _run_equal_interval(agg, k, module):
739739

740740
max_data = module.nanmax(data)
741741
min_data = module.nanmin(data)
742+
742743
if module == cupy:
743744
min_data = min_data.get()
744745
max_data = max_data.get()
745746

747+
if module == da:
748+
min_data = min_data.compute()
749+
max_data = max_data.compute()
750+
746751
width = (max_data - min_data) * 1.0 / k
747752
cuts = module.arange(min_data + width, max_data + width, width)
748753
l_cuts = cuts.shape[0]

0 commit comments

Comments
 (0)