Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #66160 > unrolled thread

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

Started bywilsonmonde@gmail.com
First post2014-02-13 01:03 -0800
Last post2014-02-13 07:31 -0500
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  AttributeError: 'Or' object has no attribute 'as_independent' wilsonmonde@gmail.com - 2014-02-13 01:03 -0800
    Re: AttributeError: 'Or' object has no attribute 'as_independent' Terry Reedy <tjreedy@udel.edu> - 2014-02-13 07:31 -0500

#66160 — AttributeError: 'Or' object has no attribute 'as_independent'

Fromwilsonmonde@gmail.com
Date2014-02-13 01:03 -0800
SubjectAttributeError: 'Or' object has no attribute 'as_independent'
Message-ID<512a3958-7f8e-4af0-a0d6-1c4dec4b1955@googlegroups.com>
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))

[toc] | [next] | [standalone]


#66175

FromTerry Reedy <tjreedy@udel.edu>
Date2014-02-13 07:31 -0500
Message-ID<mailman.6839.1392294711.18130.python-list@python.org>
In reply to#66160
On 2/13/2014 4:03 AM, wilsonmonde@gmail.com wrote:
> 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))
>
>


-- 
Terry Jan Reedy

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web