I have two 3D boolean arrays of the same shape (let's say (512,512,512)).
I'd like to check if the True region of one array is completely included in the second.
Right now the best I've come up with is:
np.all((A * B) == A)
Is there a faster way to do this? Unfortunately this goes inside an inner loop I'm not able to optimize further, so the more I shave from this the better.