def my_evalf(expr, chop=False):
 if isinstance(expr, list):
  try:
   return [x.evalf(chop=chop) for x in expr]
  except Exception:
   return expr
 try:
  return expr.evalf(chop=chop)
 except Exception:
  return expr

def my_evalf ( expr , chop = False ) : if isinstance ( expr , list ) : try : return [ x . evalf ( chop = chop ) for x in expr ] except Exception : return expr try : return expr . evalf ( chop = chop ) except Exception : return expr
enhanced sympy evalf to handle lists of expressions and catch eval failures without dropping out .