correct mask for 0D and 1D arrays