Thank you, that seems to have been the issue. I split up the vectors into 
their coefficients and entered those vector components as separate 
equations. Now the python process is humming along at 1.8Gbyte memory and 
low to medium CPU utilization. How long is realistic to wait for a positive 
result? 
jks...@gmail.com schrieb am Samstag, 30. Oktober 2021 um 14:23:41 UTC+2:

> I do not know solve well but I suspect that it cannot handle vector 
> equations. There should probably be separate equations for the components.
>
> Kalevi Suominen
> On Saturday, October 30, 2021 at 9:28:06 AM UTC+3 Andreas Schuldei wrote:
>
>> I have a system of longish equations and when calling .solve() on it, I 
>> get this traceback:
>>
>> Traceback (most recent call last):
>>   File "C:/Users/Andreas 
>> Schuldei/PycharmProjects/lissajous-achse/hgü-kabel-detektion-symbolic.py", 
>> line 109, in <module>
>>     result = solve(equations, (CM0, theta_i, theta_j, theta_k, i, a, 
>> B_earth))
>>   File "C:\Users\Andreas 
>> Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\solvers\solvers.py",
>>  
>> line 1096, in solve
>>     solution = _solve_system(f, symbols, **flags)
>>   File "C:\Users\Andreas 
>> Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\solvers\solvers.py",
>>  
>> line 1730, in _solve_system
>>     i, d = _invert(g, *symbols)
>>   File "C:\Users\Andreas 
>> Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\solvers\solvers.py",
>>  
>> line 3118, in _invert
>>     rhs -= indep
>>   File "C:\Users\Andreas 
>> Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\numbers.py",
>>  
>> line 2194, in __sub__
>>     return Rational.__sub__(self, other)
>>   File "C:\Users\Andreas 
>> Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\decorators.py",
>>  
>> line 89, in __sympifyit_wrapper
>>     return func(a, b)
>>   File "C:\Users\Andreas 
>> Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\numbers.py",
>>  
>> line 1725, in __sub__
>>     return Number.__sub__(self, other)
>>   File "C:\Users\Andreas 
>> Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\decorators.py",
>>  
>> line 89, in __sympifyit_wrapper
>>     return func(a, b)
>>   File "C:\Users\Andreas 
>> Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\numbers.py",
>>  
>> line 733, in __sub__
>>     return AtomicExpr.__sub__(self, other)
>>   File "C:\Users\Andreas 
>> Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\decorators.py",
>>  
>> line 251, in _func
>>     return func(self, other)
>>   File "C:\Users\Andreas 
>> Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\decorators.py",
>>  
>> line 126, in binary_op_wrapper
>>     return f(self)
>>   File "C:\Users\Andreas 
>> Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\decorators.py",
>>  
>> line 127, in binary_op_wrapper
>>     return func(self, other)
>>   File "C:\Users\Andreas 
>> Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\vector\basisdependent.py",
>>  
>> line 352, in __rsub__
>>     raise TypeError("Invalid argument types for subtraction")
>> TypeError: Invalid argument types for subtraction
>>
>> Process finished with exit code 1
>>
>> I stared at my code long and hard, and fixed all instances of wrong types 
>> that i could think of. Also, in order to catch the error earlier, I tried 
>> insterting .simplify() calls in places that might benefit from them - but 
>> the process ran for hours, doing the simplyfy() without even reaching the 
>> solve() call.
>>
>> So I am asking for tricks to investigate the types and them fitting 
>> together, earlier. You can find my code attached. (please critique it, I 
>> want to learn!).
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/c46690cf-a716-438f-b580-cae7b3720bedn%40googlegroups.com.

Reply via email to