八度尝试对符号取模时给出“ PolynomialError”

问题描述

我正在尝试使用angleAbsDiff计算两个角度之间的差。在我收集时,此功能依赖于mod。但是,如果尝试mod是非多项式,则会出现错误,它不是多项式。它仅适用于多项式吗?

最小示例:

syms v
mod(cos(v),sym('0.5'))

这给出了输出

Symbolic pkg v2.9.0: Python communication link active,SymPy v1.5.1.
error: Python exception: polynomialError: cos(v) contains an element of the set of generators.
    occurred at line 5 of the Python code block:
    p = poly.from_expr(f,*xx)
error: called from
    pycall_sympy__ at line 178 column 7
    coeffs at line 159 column 8
    mod at line 93 column 12
    eclipses at line 2 column 2

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)