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

solve(x, [x], solution_dict=True) error #24477

Closed
rwst opened this issue Jan 6, 2018 · 6 comments
Closed

solve(x, [x], solution_dict=True) error #24477

rwst opened this issue Jan 6, 2018 · 6 comments

Comments

@rwst
Copy link

rwst commented Jan 6, 2018

From https://groups.google.com/forum/#!topic/sage-devel/EL-kPIR1VFM:

solve(x, [x], solution_dict=True)
...
/home/ralf/sage/local/lib/python2.7/site-packages/sage/symbolic/relation.pyc in solve(f, *args, **kwds)
   1045 
   1046     if is_Expression(f): # f is a single expression
-> 1047         return _solve_expression(f, x, explicit_solutions, multiplicities, to_poly_solve, solution_dict, algorithm, domain)
   1048 
   1049     if not isinstance(f, (list, tuple)):

/home/ralf/sage/local/lib/python2.7/site-packages/sage/symbolic/relation.pyc in _solve_expression(f, x, explicit_solutions, multiplicities, to_poly_solve, solution_dict, algorithm, domain)
   1369     if solution_dict:
   1370         if isinstance(x, (list, tuple)):
-> 1371             X = [{sol.left():sol.right() for sol in b} for b in X]
   1372         else:
   1373             X = [dict([[sol.left(),sol.right()]]) for sol in X]

TypeError: 'sage.symbolic.expression.Expression' object is not iterable

CC: @EmmanuelCharpentier

Component: calculus

Issue created by migration from https://trac.sagemath.org/ticket/24477

@rwst rwst added this to the sage-8.2 milestone Jan 6, 2018
@rwst

This comment has been minimized.

@fchapoton
Copy link
Contributor

comment:3

fixed by #31452, so duplicate, please confirm

@fchapoton fchapoton removed this from the sage-8.2 milestone May 24, 2021
@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented May 24, 2021

comment:4

Replying to @fchapoton:

fixed by #31452, so duplicate, please confirm

Nope. On 9.3 :

sage: solve(x, [x], solution_dict=True)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-5-6f16dd325c63> in <module>
----> 1 solve(x, [x], solution_dict=True)

/usr/local/sage-9/local/lib/python3.9/site-packages/sage/symbolic/relation.py in solve(f, *args, **kwds)
   1041 
   1042     if is_Expression(f): # f is a single expression
-> 1043         return _solve_expression(f, x, explicit_solutions, multiplicities, to_poly_solve, solution_dict, algorithm, domain)
   1044 
   1045     if not isinstance(f, (list, tuple)):

/usr/local/sage-9/local/lib/python3.9/site-packages/sage/symbolic/relation.py in _solve_expression(f, x, explicit_solutions, multiplicities, to_poly_solve, solution_dict, algorithm, domain)
   1366     if solution_dict:
   1367         if isinstance(x, (list, tuple)):
-> 1368             X = [{sol.left():sol.right() for sol in b} for b in X]
   1369         else:
   1370             X = [dict([[sol.left(),sol.right()]]) for sol in X]

/usr/local/sage-9/local/lib/python3.9/site-packages/sage/symbolic/relation.py in <listcomp>(.0)
   1366     if solution_dict:
   1367         if isinstance(x, (list, tuple)):
-> 1368             X = [{sol.left():sol.right() for sol in b} for b in X]
   1369         else:
   1370             X = [dict([[sol.left(),sol.right()]]) for sol in X]

TypeError: 'sage.symbolic.expression.Expression' object is not iterable

==> needs_work, and relevant milestone.

@EmmanuelCharpentier EmmanuelCharpentier mannequin added this to the sage-9.4 milestone May 24, 2021
@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented May 24, 2021

comment:5

Wups : #31452 in NOT in 9.3 (I should wear my spectacles when reading trac...).

I'll test this. Restoring status...

Apologies.

Replying to @EmmanuelCharpentier:

Replying to @fchapoton:

fixed by #31452, so duplicate, please confirm

Nope. On 9.3 :

sage: solve(x, [x], solution_dict=True)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-5-6f16dd325c63> in <module>
----> 1 solve(x, [x], solution_dict=True)

/usr/local/sage-9/local/lib/python3.9/site-packages/sage/symbolic/relation.py in solve(f, *args, **kwds)
   1041 
   1042     if is_Expression(f): # f is a single expression
-> 1043         return _solve_expression(f, x, explicit_solutions, multiplicities, to_poly_solve, solution_dict, algorithm, domain)
   1044 
   1045     if not isinstance(f, (list, tuple)):

/usr/local/sage-9/local/lib/python3.9/site-packages/sage/symbolic/relation.py in _solve_expression(f, x, explicit_solutions, multiplicities, to_poly_solve, solution_dict, algorithm, domain)
   1366     if solution_dict:
   1367         if isinstance(x, (list, tuple)):
-> 1368             X = [{sol.left():sol.right() for sol in b} for b in X]
   1369         else:
   1370             X = [dict([[sol.left(),sol.right()]]) for sol in X]

/usr/local/sage-9/local/lib/python3.9/site-packages/sage/symbolic/relation.py in <listcomp>(.0)
   1366     if solution_dict:
   1367         if isinstance(x, (list, tuple)):
-> 1368             X = [{sol.left():sol.right() for sol in b} for b in X]
   1369         else:
   1370             X = [dict([[sol.left(),sol.right()]]) for sol in X]

TypeError: 'sage.symbolic.expression.Expression' object is not iterable

==> needs_work, and relevant milestone.

@EmmanuelCharpentier EmmanuelCharpentier mannequin removed this from the sage-9.4 milestone May 24, 2021
@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented May 24, 2021

comment:6

Rebased on 9.3, {{{ptestlong}} of your branch gimes me exactly the same failures (two
gap-related permanent failures and one transient pari-gp timeout) as 9.3.

==> positive_review (for good, this time (I hope...)).

@EmmanuelCharpentier EmmanuelCharpentier mannequin added this to the sage-9.4 milestone May 24, 2021
@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented May 24, 2021

comment:7

I'm stupid : I positioned positive_review on a duplicate ticket. Fixed. Time for a walk...

@EmmanuelCharpentier EmmanuelCharpentier mannequin removed this from the sage-9.4 milestone May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants