解决双边限制的存在

时间:2018-04-19 20:38:29

标签: python sympy

我不知道这个错误是由于什么,根据其他用户我应该有一个错误,因为限制不存在,但是,它给了我另一个,我有最新版本的同情

x = Symbol('x')
a=Limit((5-x)/(x-2), x, 2,"+").doit()
print(a)
b=limit((5-x) / (x-2), x, 2, "+-")
print(b)
c=Limit((5-x)/(x-2), x, 2,dir="+-").doit()
print(c)
"direction must be either '+' or '-', not %s" % dir)
ValueError: direction must be either '+' or '-', not +-

1 个答案:

答案 0 :(得分:0)

参数dir="+-"在SymPy的当前开发版本中实现,您可以通过cloning from its GitHub repo获取。

它没有在1.1.1中实现,这是当前版本。它将在1.2,下一个SymPy发布。

相关问题