As mentioned, you need to pass copy=True also. This creates the copy in the MicroPython heap. Then you can use that for masks.
As mentioned, you need to pass copy=True also. This creates the copy in the MicroPython heap. Then you can use that for masks.