MCPcopy Index your code
hub / github.com/numpy/numpy / harden_mask

Method harden_mask

numpy/ma/core.py:3620–3636  ·  view source on GitHub ↗

Force the mask to hard, preventing unmasking by assignment. Whether the mask of a masked array is hard or soft is determined by its `~ma.MaskedArray.hardmask` property. `harden_mask` sets `~ma.MaskedArray.hardmask` to ``True`` (and returns the modified self)

(self)

Source from the content-addressed store, hash-verified

3618 raise NotImplementedError("Coming soon: setting the mask per records!")
3619
3620 def harden_mask(self):
3621 """
3622 Force the mask to hard, preventing unmasking by assignment.
3623
3624 Whether the mask of a masked array is hard or soft is determined by
3625 its `~ma.MaskedArray.hardmask` property. `harden_mask` sets
3626 `~ma.MaskedArray.hardmask` to ``True`` (and returns the modified
3627 self).
3628
3629 See Also
3630 --------
3631 ma.MaskedArray.hardmask
3632 ma.MaskedArray.soften_mask
3633
3634 """
3635 self._hardmask = True
3636 return self
3637
3638 def soften_mask(self):
3639 """

Callers 6

test_hardmaskMethod · 0.45
test_hardmaskMethod · 0.45
test_putmaskMethod · 0.45
test_setitemMethod · 0.45

Calls

no outgoing calls

Tested by 6

test_hardmaskMethod · 0.36
test_hardmaskMethod · 0.36
test_putmaskMethod · 0.36
test_setitemMethod · 0.36