Skip to content

Commit

Permalink
update code to support python3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasK committed Oct 31, 2023
1 parent 00cd7ce commit 2c30270
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion earthdaily/earthdatastore/cube_utils/_zonal.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ def zonal_stats_numpy(
if len(yx_pos) <= i + 1:
break
pos = np.asarray(yx_pos[i + 1])
data = mem_asset[*pos]
if len(pos)==2:
data = mem_asset[pos[0],pos[1]]
elif len(pos)==1:
data = mem_asset[pos[0]]
if data.size > 0:
res = [operation(data) for operation in operations.values()]
else:
Expand Down

0 comments on commit 2c30270

Please sign in to comment.