Skip to content

Commit 9a53c55

Browse files
authored
Small Fixes while testing Cuda 13 (#818)
* removed cupy result_type hack fixes #816 * fixed aspect unit test * fixed the equal_interval dask numpy case to call compute() on the nanmax and nanmin functions. * refactored focal_stats for cupy arrays * fixed viewshed test
1 parent 4f89f6b commit 9a53c55

File tree

5 files changed

+280
-97
lines changed

5 files changed

+280
-97
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)