【发布时间】:2022-12-01 18:33:33
【问题描述】:
I'm trying to figure out how xreplace works. When I write
from sympy import *
my_list = [1234.5678, 22.333333]
my_list.xreplace({n : round(n, 4) for n in expr.atoms(Number)})
I get an error:'list' object has no attribute 'xreplace'. What did I write wrong?
【问题讨论】: