Skip to main content
Ctrl+K
Logo image

Site Navigation

  • User Guide
  • API reference
  • Development
  • Release notes
  • Learn
  • NEPs

Site Navigation

  • User Guide
  • API reference
  • Development
  • Release notes
  • Learn
  • NEPs

Section Navigation

  • Array objects
    • The N-dimensional array (ndarray)
    • Scalars
    • Data type objects (dtype)
    • Indexing routines
    • Iterating over arrays
    • Standard array subclasses
    • Masked arrays
      • The numpy.ma module
      • Constants of the numpy.ma module
      • Masked array operations
    • The array interface protocol
    • Datetimes and Timedeltas
  • Array API Standard Compatibility
  • Constants
  • Universal functions (ufunc)
  • Routines
  • Typing (numpy.typing)
  • Global state
  • Packaging (numpy.distutils)
  • NumPy distutils - users guide
  • Status of numpy.distutils and migration advice
  • NumPy C-API
  • CPU/SIMD Optimizations
  • NumPy security
  • NumPy and SWIG
  • NumPy reference
  • Constants of the numpy.ma module
  • numpy.ma.MaskedArray.harden_mask

numpy.ma.MaskedArray.harden_mask#

method

ma.MaskedArray.harden_mask()[source]#

Force the mask to hard, preventing unmasking by assignment.

Whether the mask of a masked array is hard or soft is determined by its hardmask property. harden_mask sets hardmask to True (and returns the modified self).

See also

ma.MaskedArray.hardmask
ma.MaskedArray.soften_mask

previous

numpy.ma.MaskedArray.__setmask__

next

numpy.ma.MaskedArray.soften_mask

On this page
  • ma.MaskedArray.harden_mask

© Copyright 2008-2023, NumPy Developers.

Created using Sphinx 7.2.6.

Built with the PyData Sphinx Theme 0.13.3.