It just struck me that "mdtol" could be viewed as specifying maximum for "n_missing" at each point, in which case you can potentially get unexpected slight rounding errors.
We could avoid this by staying in 'points count' units + allowing a tolerance, like ..
```new_data_pt_mask = (n_missing - n_elem * mdtol) > 0.5```

For what it's worth, I think that would also make the '0' and '1' special cases handling unnecessary.
But maybe you put that in for efficiency or clarity, rather than correctness ?