code: def _constant_probability_density(self, X):
          
          result = np.zeros(X.shape)
          result[np.nonzero(X == self.constant_value)] = 1
  
          return result
docs: Probability density for the degenerate case of constant distribution.
  
          Note that the output of this method will be an array whose unique values are 0 and 1.
          More information can be found here: https://en.wikipedia.org/wiki/Degenerate_distribution
  
          Args:
              X(numpy.ndarray): Values to compute pdf.
  
          Returns:
              numpy.ndarray: Probability densisty for the given values