Skip to content

Commit

Permalink
Explicitly cast indices to int, to cope with numpy-2 changes to scala…
Browse files Browse the repository at this point in the history
…r handling (#79)
  • Loading branch information
neilflood authored Jun 18, 2024
1 parent ced4e16 commit aa61b45
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fmask/fmask.py
Original file line number Diff line number Diff line change
Expand Up @@ -1233,10 +1233,10 @@ def matchOneShadow(cloudmask, shadowEntry, potentialShadow, Tcloudbase, Tlow, Th
Ystep = (Yoff_max - Yoff_min) / numSteps

# shadowTemplate is a rectangle containing just the shadow shape to be shifted
row0 = shapeNdx[0].min()
rowN = shapeNdx[0].max()
col0 = shapeNdx[1].min()
colN = shapeNdx[1].max()
row0 = int(shapeNdx[0].min())
rowN = int(shapeNdx[0].max())
col0 = int(shapeNdx[1].min())
colN = int(shapeNdx[1].max())
(nrows, ncols) = ((rowN - row0 + 1), (colN - col0 + 1))
shadowTemplate = numpy.zeros((nrows, ncols), dtype=bool)
shadowTemplate[shapeNdx[0] - row0, shapeNdx[1] - col0] = True
Expand Down

0 comments on commit aa61b45

Please sign in to comment.