`mask_weights` seems completely ignored in that class. Is that intended? If so, it may be better to remove that parameter from `__init__`, or at least document it, and raise an Exception if we try to use a mask with some zeros.