Actually, maybe my first point is wrong, because of the different dtypes (the masks use 8 bytes, while the data uses probably 32 or 64 bytes). I would just inline the two arrays and not take in account my idea of using the abs. Sorry for the noise.