Skip to content

Commit

Permalink
replace np.bool with bool (GeoscienceAustralia#1081)
Browse files Browse the repository at this point in the history
Co-authored-by: Ariana Barzinpour <[email protected]>
  • Loading branch information
Ariana-B and Ariana Barzinpour authored Jun 20, 2023
1 parent 7cb536e commit 1899a70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tools/dea_tools/datahandling.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,8 @@ def wofs_fuser(dest, src):
Note: this is a copy of the function located here:
https://github.com/GeoscienceAustralia/digitalearthau/blob/develop/digitalearthau/utils.py
"""
empty = (dest & 1).astype(np.bool)
both = ~empty & ~((src & 1).astype(np.bool))
empty = (dest & 1).astype(bool)
both = ~empty & ~((src & 1).astype(bool))
dest[empty] = src[empty]
dest[both] |= src[both]

Expand Down Expand Up @@ -739,7 +739,7 @@ def dilate(array, dilation=10, invert=True):
array = ~array

return ~binary_dilation(
array.astype(np.bool), structure=kernel.reshape((1,) + kernel.shape)
array.astype(bool), structure=kernel.reshape((1,) + kernel.shape)
)


Expand Down

0 comments on commit 1899a70

Please sign in to comment.