The tiling is unnecessary, the squeeze is going to get you in trouble if any of the dimensions are 1. How about one of the following:

`newvol = np.where(mask, vol, 0)`
`vol[mask == 0]`
`vol *= mask`

I like the first because I try and avoid functions that change their arguments, this is bordering on style, but but i find that it's good practice and helps prevent subtle bugs. In this case it's pretty clear that this change is the only thing being done by this function so maybe it's ok.