Fixed #208

This fixes issue #208. `np.isnan` doesn't work on masked arrays, that's why `mask_to_mirrored_num` wasn't called. As the code was changed to completely use masked arrays now, the mask_to_mirrored_num` function may not even be necessary. But I think we'll keep it as an option.