docs: def const(f):
      '''
      const(f) yields f.c if f is a constant potential function; if f is a constant, it yields f or
        the equivalent numpy array object; if f is a potential function that is not const, or is not
        a valid potential function constant, yields None.
      '''
      if is_const_potential(f): return f.c
      elif pimms.is_array(f, 'number'):
          if sps.issparse(f): return f
          else: return np.asarray(f)
      else: return None