Re: [sage-support] Importing sympy breaks CyclotomicField

2023-08-20 Thread Vincent Delecroix
I imagine the preparser could be made more robust with sage: preparse("32") 'sage.rings.integer.Integer(32)' On Sat, 19 Aug 2023 at 02:08, Nils Bruin wrote: > > Perhaps superfluously: the reason why redefining `Integer` (in your example > through "from sympy import *") can break a command in sa

Re: [sage-support] Importing sympy breaks CyclotomicField

2023-08-18 Thread Nils Bruin
Perhaps superfluously: the reason why redefining `Integer` (in your example through "from sympy import *") can break a command in sage that does not seem to involve `Integer`: sage: preparse("K = CyclotomicField(32)") 'K = CyclotomicField(Integer(32))' Due to Sage's preparser, any use of intege

Re: [sage-support] Importing sympy breaks CyclotomicField

2023-08-18 Thread Dima Pasechnik
On Fri, Aug 18, 2023 at 12:02 PM Jan Groenewald wrote: > > Hi > > I am not sure that is a bug... > > sage: K = CyclotomicField(32) > sage: type(Integer) > > sage: from sympy import * > sage: type(Integer) > > sage: K = CyclotomicField(int(32)) I don't think it's a bug - "Integer" is not a reser

Re: [sage-support] Importing sympy breaks CyclotomicField

2023-08-18 Thread Jan Groenewald
Hi I am not sure that is a bug... sage: K = CyclotomicField(32) sage: type(Integer) sage: from sympy import * sage: type(Integer) sage: K = CyclotomicField(int(32)) sage: Regards, Jan On Fri, 18 Aug 2023 at 10:33, Александр Каренин (alexKar) < tremeloesa...@gmail.com> wrote: > As reported i

[sage-support] Importing sympy breaks CyclotomicField

2023-08-18 Thread alexKar
As reported in https://ask.sagemath.org/question/72642/does-sympy-break-cyclotomicfield/ , importing sympy as from sympy import * and then trying to construct a CyclotomicField as K = CyclotomicField(32) results in an error: TypeError: unable to coerce to an integer This seems to be