AttributeError: 'Or' object has no attribute 'as_independent'

W

wilsonmonde

Traceback (most recent call last):
File "testcsv.py", line 17, in <module>
print(sy.solve([x^2+x+1-t, x^3+x^2-t], x))
File "C:\Python27\lib\site-packages\sympy\solvers\solvers.py", line 902, in so
lve
solution = _solve_system(f, symbols, **flags)
File "C:\Python27\lib\site-packages\sympy\solvers\solvers.py", line 1434, in _
solve_system
i, d = _invert(g, *symbols)
File "C:\Python27\lib\site-packages\sympy\solvers\solvers.py", line 2422, in _
invert
indep, dep = lhs.as_independent(*symbols)
AttributeError: 'Or' object has no attribute 'as_independent'


Code:

import csv as csv
import os
import numpy as np
import sympy as sy
#from sympy import solve, Poly, Eq, Function, exp
from sympy import *
from numpy import *
from numpy.linalg import *
from sympy.polys.polyfuncs import interpolate
from sympy import Function, dsolve, Eq, Derivative, sin, cos
from sympy.abc import x

f = sy.Function('f')
x = sy.Symbol("x")
t = sy.Symbol("t")

print(sy.solve([x^2+x+1-t, x^3+x^2-t], x))
print(sy.solve((x^2+x+1-t, x^3+x^2-t), x))
 
T

Terry Reedy

Traceback (most recent call last):
File "testcsv.py", line 17, in <module>
print(sy.solve([x^2+x+1-t, x^3+x^2-t], x))
File "C:\Python27\lib\site-packages\sympy\solvers\solvers.py", line 902, in so
lve
solution = _solve_system(f, symbols, **flags)
File "C:\Python27\lib\site-packages\sympy\solvers\solvers.py", line 1434, in _
solve_system
i, d = _invert(g, *symbols)
File "C:\Python27\lib\site-packages\sympy\solvers\solvers.py", line 2422, in _
invert
indep, dep = lhs.as_independent(*symbols)
AttributeError: 'Or' object has no attribute 'as_independent'

You should report this on the sympy list. It is mirrored on
news.gmane.org as gmane,comp.python.sympy.
Code:

import csv as csv
import os
import numpy as np
import sympy as sy
#from sympy import solve, Poly, Eq, Function, exp
from sympy import *
from numpy import *
from numpy.linalg import *
from sympy.polys.polyfuncs import interpolate
from sympy import Function, dsolve, Eq, Derivative, sin, cos
from sympy.abc import x

f = sy.Function('f')
x = sy.Symbol("x")
t = sy.Symbol("t")

print(sy.solve([x^2+x+1-t, x^3+x^2-t], x))
print(sy.solve((x^2+x+1-t, x^3+x^2-t), x))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top