Use utils.as_ndarray is this case:

    mask = utils.as_ndarray(mask_img.get_data(), dtype=np.bool)

It ensures that as few copies as possible are made, and the data is loaded for disk as fast as possible (there are some corners cases that make your top-notch SAS hard disk drive behave like a floppy disk). See the source code of utils.py for details.