fix to_masked
@@ -703,6 +703,7 @@ class MapDataset(Dataset):
Masked dataset
"""
dataset = self.__class__.from_geoms(**self.geoms, name=name)
+ if self.mask_fit:
dataset.mask_fit.data = False
dataset.stack(self, nan_to_num=nan_to_num)
return dataset
