code: def add(self, point, value):
          
          # check range
          for p, r in zip(point, self.range):
              if p < r[0] or p > r[1]:
                  return
          # check nan
          if isnan(value):
              return
  
          refs = self.opts['references']
          # for all neighbour points (1, if antialiasting=False):
          for position, intensity in self.sortMethod.getPositionsIntensities(
                  point):
              position = tuple(position)
              if self.mean is not None:
                  old_value = self.values[position]
                  if not np.isnan(old_value):
                      anz_values = self.density[position]
                      mean = old_value + intensity * (
                          ((value - old_value) / (anz_values + intensity)))
                      self.mean[position] = mean
  
                      if self.variance is not None:
                          self.variance[
                              position] += (abs(value - mean) / (
                                  anz_values + intensity))
  
              if self.mergeMethod(self.values, position, intensity, value):
                  for a in refs:
                      a.mergeMethod(a, position, intensity, value)
              if self.density is not None:
                  self.density[position] += intensity
docs: Assign all self.merge_values to the self._mergeMatrix
          Get the position/intensity of a value