Re: [sage-support] How to convert complex_root_of to QQbar (algebraic number)

2023-04-01 Thread William Stein
On Sat, Apr 1, 2023 at 6:34 AM Emmanuel Charpentier < emanuel.charpent...@gmail.com> wrote: > Le vendredi 31 mars 2023 à 15:19:51 UTC+2, William Stein a écrit : > > [ Snip… ] > > Meta comment -- I added this "Help me fix this..." feature to cocalc > jupyter notebooks a week ago, and it's been

Re: [sage-support] How to convert complex_root_of to QQbar (algebraic number)

2023-04-01 Thread Emmanuel Charpentier
Le vendredi 31 mars 2023 à 15:19:51 UTC+2, William Stein a écrit : [ Snip… ] Meta comment -- I added this "Help me fix this..." feature to cocalc jupyter notebooks a week ago, and it's been extremely popular with 1000+ uses a day. It's exactly the sort of thing that ChatGPT can be very

[sage-support] How to convert complex_root_of to QQbar (algebraic number)

2023-03-31 Thread Marcel Moosbrugger
I am trying to convert "complex_root_of" expressions to algebraic numbers (elements in the field QQbar). However, I get a "ValueError" with the message "to many values to unpack". A minimal example would be: from sage.all import * from sympy import sympify exp1 = sympify("CRootOf(x**2 + 1,