code: def fill_masked(self, value=-1, copy=True):
          
  
          if self.mask is None:
              raise ValueError('no mask is set')
  
          # apply the mask
          data = np.array(self.values, copy=copy)
          data[self.mask, ...] = value
  
          if copy:
              out = type(self)(data)  # wrap
              out.is_phased = self.is_phased
              # don't set mask because it has been filled in
          else:
              out = self
              out.mask = None  # reset mask
  
          return out
docs: Fill masked genotype calls with a given value.
  
          Parameters
          ----------
          value : int, optional
              The fill value.
          copy : bool, optional
              If False, modify the array in place.
  
          Returns
          -------
          g : GenotypeArray
  
          Examples
          --------
  
          >>> import allel
          >>> g = allel.GenotypeArray([[[0, 0], [0, 1]],
          ...                          [[0, 1], [1, 1]],
          ...                          [[0, 2], [-1, -1]]], dtype='i1')
          >>> mask = [[True, False], [False, True], [False, False]]
          >>> g.mask = mask
          >>> g.fill_masked().values
          array([[[-1, -1],
                  [ 0,  1]],
                 [[ 0,  1],
                  [-1, -1]],
                 [[ 0,  2],
                  [-1, -1]]], dtype=int8)