def const(f):
if is_const_potential(f): return f.c<EOL>elif pimms.is_array(f, '<STR_LIT>'):<EOL><INDENT>if sps.issparse(f): return f<EOL>else: return np.asarray(f)<EOL><DEDENT>else: return None<EOL>
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.