code: def round_sigfigs(x, n=2):
      
      iterable = is_iterable(x)
      if not iterable: x = [x]
  
      # make a copy to be safe
      x = _n.array(x)
      
      # loop over the elements
      for i in range(len(x)):
          
          # Handle the weird cases
          if not x[i] in [None, _n.inf, _n.nan]:
              sig_figs = -int(_n.floor(_n.log10(abs(x[i]))))+n-1
              x[i] = _n.round(x[i], sig_figs)
          
      if iterable: return x
      else:        return x[0]
docs: Rounds the number to the specified significant figures. x can also be 
      a list or array of numbers (in these cases, a numpy array is returned).