code: def bingham_mean(dec=None, inc=None, di_block=None):
      
      if di_block is None:
          di_block = make_di_block(dec, inc)
          return pmag.dobingham(di_block)
      else:
          return pmag.dobingham(di_block)
docs: Calculates the Bingham mean and associated statistical parameters from
      either a list of declination values and a separate list of inclination
      values or from a di_block (a nested list a nested list of [dec,inc,1.0]).
      Returns a dictionary with the Bingham mean and statistical parameters.
  
      Parameters
      ----------
      dec: list of declinations
      inc: list of inclinations
  
      or
  
      di_block: a nested list of [dec,inc,1.0]
  
      A di_block can be provided instead of dec, inc lists in which case it will
      be used. Either dec, inc lists or a di_block need to passed to the function.
  
      Returns
      ---------
      bpars : dictionary containing the Bingham mean and associated statistics.
  
      Examples
      --------
      Use lists of declination and inclination to calculate a Bingham mean:
  
      >>> ipmag.bingham_mean(dec=[140,127,142,136],inc=[21,23,19,22])
      {'Edec': 220.84075754194598,
       'Einc': -13.745780972597291,
       'Eta': 9.9111522306938742,
       'Zdec': 280.38894136954474,
       'Zeta': 9.8653370276451113,
       'Zinc': 64.23509410796224,
       'dec': 136.32637167111312,
       'inc': 21.34518678073179,
       'n': 4}
  
      Use a di_block to calculate a Bingham mean (will give the same output as the
      example with the lists):
  
      >>> ipmag.bingham_mean(di_block=[[140,21],[127,23],[142,19],[136,22]])