### Navigation

- index
- modules |
- next |
- previous |
- NumPy v1.3 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Masked array operations »

# numpy.ma.make_mask

`numpy.ma.``make_mask`(m, copy=False, shrink=True, flag=None, dtype=<type 'numpy.bool_'>)

  Return m as a mask, creating a copy if necessary or requested.

  The function can accept any sequence of integers or nomask. Does not check that contents must be 0s and 1s.

  Parameters: | m : array_like Potential mask. copy : bool Whether to return a copy of m (True) or m itself (False). shrink : bool Whether to shrink m to nomask if all its values are False. dtype : dtype Data-type of the output mask. By default, the output mask has a dtype of MaskType (bool). If the dtype is flexible, each field has a boolean dtype.

### Navigation

- index
- modules |
- next |
- previous |
- NumPy v1.3 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Masked array operations »