I'm using geemap package to refactor a code from JavaScript to Python and I couldn't find a way to replicate these two lines
var swbdMask = swbd.unmask().not().focal_median(1)
var hmask = hand30_100.gt(20).focal_max(10).not()
My issue is with the not()
. Both swbdMask
and hmask
are ee.Image objects. I tried using not
but it changes the object type into boolean which is clearly not what I want.
Is there a way to do it in Python?