Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Week 2025 01 #198

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Week 2025 01 #198

wants to merge 4 commits into from

Conversation

moorepants
Copy link
Owner

No description provided.

@moorepants
Copy link
Owner Author

I tried to use linear_eq_to_matrix() but it fails:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[80], line 3
      1 unknowns = sm.Matrix([L1, L2, L3, L4, L5, L6])
----> 3 coef_mat, rhs = sm.linear_eq_to_matrix(exprs, unknowns)
      5 sol = coef_mat.LUsolve(rhs)
      7 sm.Eq(unknowns, sol)

File ~/miniconda/envs/multibody-book/lib/python3.11/site-packages/sympy/solvers/solveset.py:2628, in linear_eq_to_matrix(equations, *symbols)
   2626 # construct the dictionaries
   2627 try:
-> 2628     eq, c = _linear_eq_to_dict(equations, symbols)
   2629 except PolyNonlinearError as err:
   2630     raise NonlinearError(str(err))

File ~/miniconda/envs/multibody-book/lib/python3.11/site-packages/sympy/polys/matrices/linsolve.py:154, in _linear_eq_to_dict(eqs, syms)
    152 coeffs = []
    153 ind = []
--> 154 symset = set(syms)
    155 for i, e in enumerate(eqs):
    156     if e.is_Equality:

TypeError: unhashable type: 'MutableDenseMatrix'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant