code: def is_hom(self, allele=None):
          
  
          if allele is None:
              allele1 = self.values[..., 0, np.newaxis]
              other_alleles = self.values[..., 1:]
              tmp = (allele1 >= 0) & (allele1 == other_alleles)
              out = np.all(tmp, axis=-1)
          else:
              out = np.all(self.values == allele, axis=-1)
  
          # handle mask
          if self.mask is not None:
              out &= ~self.mask
  
          return out
docs: Find genotype calls that are homozygous.
  
          Parameters
          ----------
          allele : int, optional
              Allele index.
  
          Returns
          -------
          out : ndarray, bool, shape (n_variants, n_samples)
              Array where elements are True if the genotype call matches the
              condition.
  
          Examples
          --------
  
          >>> import allel
          >>> g = allel.GenotypeArray([[[0, 0], [0, 1]],
          ...                          [[0, 1], [1, 1]],
          ...                          [[2, 2], [-1, -1]]])
          >>> g.is_hom()
          array([[ True, False],
                 [False,  True],
                 [ True, False]])
          >>> g.is_hom(allele=1)
          array([[False, False],
                 [False,  True],
                 [False, False]])
          >>> v = g[:, 0]
          >>> v
          <GenotypeVector shape=(3, 2) dtype=int64>
          0/0 0/1 2/2
          >>> v.is_hom()
          array([ True, False,  True])