[sage-support] Eigen spaces of algebraic matrices broken ?

2022-01-29 Thread Emmanuel Charpentier


Setup : Sage 9.5.rc1 running in Debian testing on core i7 + 16 GB RAM.

def test(Size=2, Ring=QQ):
from time import time as stime
with seed(0):
M = matrix(Ring, Size, Size, lambda u, v:Ring.random_element())
t0 = stime()
SL = M.eigenspaces_left(algebraic_multiplicity=True)
t1 = stime()
VL = M.eigenvectors_left()
t2 = stime()
return t1-t0, SL, t2-t1, VL

test() runs as expected, as well as test(Size=5) and test(Ring=AA), with 
very reasonable runtimes (under a second, IIRC). But test(Size=3, Ring=AA) 
“never returns” (meaning that it hadn’t returned when I interrupted it 
after tens of minutes). Further exploration showec that neither 
M.eigenspaces_left(algebraic_multiplicity=True) nor M.eigenvectors_left() 
return.

Is that an expected behaviour ?

FWIW, stack trace at interruption :

sage: AA3=test(Size=3, Ring=AA)
AA3=test(Size=3, Ring=AA)  C-c 
C-c---
AttributeErrorTraceback (most recent call last)
/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
 in minpoly(self)
   4492 try:
-> 4493 return self._minimal_polynomial
   4494 except AttributeError:

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/structure/element.pyx
 in sage.structure.element.Element.__getattr__ 
(build/cythonized/sage/structure/element.c:4754)()
493 """
--> 494 return self.getattr_from_category(name)
495 

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/structure/element.pyx
 in sage.structure.element.Element.getattr_from_category 
(build/cythonized/sage/structure/element.c:4866)()
506 cls = P._abstract_element_class
--> 507 return getattr_from_other_class(self, cls, name)
508 

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/cpython/getattr.pyx
 in sage.cpython.getattr.getattr_from_other_class 
(build/cythonized/sage/cpython/getattr.c:2633)()
360 dummy_error_message.name = name
--> 361 raise AttributeError(dummy_error_message)
362 attribute = attr

AttributeError: 'sage.rings.real_mpfi.RealIntervalFieldElement' object has no 
attribute '_evaluate_polynomial'

During handling of the above exception, another exception occurred:

KeyboardInterrupt Traceback (most recent call last)
 in 
> 1 AA3=test(Size=Integer(3), Ring=AA)

 in test(Size, Ring)

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/matrix/matrix2.pyx
 in sage.matrix.matrix2.Matrix.eigenspaces_left 
(build/cythonized/sage/matrix/matrix2.c:43588)()
   6270 self = self.change_ring(F)
   6271 A = self - alpha
-> 6272 W = A.kernel()
   6273 V.append((alpha, 
W.ambient_module().span_of_basis(W.basis()), e))
   6274 else:

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/matrix/matrix2.pyx
 in sage.matrix.matrix2.Matrix.left_kernel 
(build/cythonized/sage/matrix/matrix2.c:32440)()
   4947 
   4948 tm = verbose("computing left kernel for %sx%s matrix" % 
(self.nrows(), self.ncols()),level=1)
-> 4949 K = self.transpose().right_kernel(*args, **kwds)
   4950 self.cache('left_kernel', K)
   4951 verbose("done computing left kernel for %sx%s matrix" % 
(self.nrows(), self.ncols()),level=1,t=tm)

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/matrix/matrix2.pyx
 in sage.matrix.matrix2.Matrix.right_kernel 
(build/cythonized/sage/matrix/matrix2.c:31909)()
   4785 
   4786 # Go get the kernel matrix, this is where it all happens
-> 4787 M = self.right_kernel_matrix(*args, **kwds)
   4788 
   4789 ambient = R**self.ncols()

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/matrix/matrix2.pyx
 in sage.matrix.matrix2.Matrix.right_kernel_matrix 
(build/cythonized/sage/matrix/matrix2.c:30829)()
   4394 
   4395 if M is None and R in _Fields:
-> 4396 format, M = self._right_kernel_matrix_over_field()
   4397 
   4398 if M is None and R.is_integral_domain():

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/matrix/matrix2.pyx
 in sage.matrix.matrix2.Matrix._right_kernel_matrix_over_field 
(build/cythonized/sage/matrix/matrix2.c:27969)()
   3686 from sage.matrix.matrix_space import MatrixSpace
   3687 tm = verbose("computing right kernel matrix over an arbitrary 
field for %sx%s matrix" % (self.nrows(), self.ncols()),level=1)
-> 3688 E = self.echelon_form(*args, **kwds)
   3689 pivots = E.pivots()
   3690 pivots_set = set(pivots)


[sage-support] Re: Interact broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-01-29 Thread kcrisman
Just for data points, which browsers did you try on this?  Thanks for 
reporting.

On Friday, January 28, 2022 at 1:02:57 PM UTC-5 alan_thoma...@yahoo.co.uk 
wrote:

> Interact just calls the function but no Interact widgets appear.
>
> Example attached. It works at Cocalc.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/e0a15937-dcd4-49aa-9dce-cda82b3e3fa0n%40googlegroups.com.


[sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-01-29 Thread Emmanuel Charpentier


The promlem seems tolie wit (my use of) polynomial rings to compute the 
eigenvectors. Manually, after executing

dims = M.dimensions()
if dims[0] != dims[1]: raise DomainError("Not a square matrix !")
dim = dims[0]
BR = M.base_ring()
try:
WR = BR.algebraic_closure()
except AttributeError:
WR = BR
WPR = WR["t"]
t = WPR.gens()[0]
# CP = WPR(M.charpoly(var="t"))
# Eigenvalues
CP = M.charpoly(var="t")
lambdas = CP.roots(ring=WR)
# Eigenvectors
Id = identity_matrix(WR,dim)
WM = M.apply_map(lambda u:WR(u))
PR = PolynomialRing(WR,list(("v%d"%u for u in range(dim
J=PR.ideal(*(WM-Id*lambdas[0][0])*vector(PR.gens()))

neither J.dimension() nor J.variety() returns ; the interruption gives :

sage: J.dimension()
  C-c 
C-c---
KeyboardInterrupt Traceback (most recent call last)
 in 
> 1 J.dimension()

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/polynomial/multi_polynomial_ideal.py
 in __call__(self, *args, **kwds)
295 if not R.base_ring().is_field():
296 raise ValueError("Coefficient ring must be a field for 
function '%s'."%(self.f.__name__))
--> 297 return self.f(self._instance, *args, **kwds)
298 
299 require_field = RequireField

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar_decorators.py
 in wrapper(*args, **kwds)
111 # same_field=True might trigger an exception otherwise.
112 
--> 113 numfield, new_elems, morphism = 
number_field_elements_from_algebraics(orig_elems, same_field=True, minimal=True)
114 
115 elem_dict = dict(zip(orig_elems, new_elems))

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
 in number_field_elements_from_algebraics(numbers, minimal, same_field, 
embedded, prec)
   2759 real_numbers = []
   2760 for v in numbers:
-> 2761 if v._exact_field().is_complex() and real_case:
   2762 # the number comes from a complex algebraic number field
   2763 embedded_rt = v.interval_fast(RealIntervalField(prec))

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
 in _exact_field(self)
   4428 if isinstance(sd, (ANRational, ANExtensionElement)):
   4429 return sd.generator()
-> 4430 self.exactify()
   4431 return self._exact_field()
   4432 

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
 in exactify(self)
   4363 if isinstance(od, (ANRational, ANExtensionElement)):
   4364 return
-> 4365 self._set_descr(self._descr.exactify())
   4366 
   4367 def _set_descr(self, new_descr):

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
 in exactify(self)
   8180 
   8181 if op == 'real':
-> 8182 arg.exactify()
   8183 rv = (arg + arg.conjugate()) / 2
   8184 rv.exactify()

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
 in exactify(self)
   4363 if isinstance(od, (ANRational, ANExtensionElement)):
   4364 return
-> 4365 self._set_descr(self._descr.exactify())
   4366 
   4367 def _set_descr(self, new_descr):

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
 in exactify(self)
   8429 left = self._left
   8430 right = self._right
-> 8431 left.exactify()
   8432 right.exactify()
   8433 gen = left._exact_field().union(right._exact_field())

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
 in exactify(self)
   4363 if isinstance(od, (ANRational, ANExtensionElement)):
   4364 return
-> 4365 self._set_descr(self._descr.exactify())
   4366 
   4367 def _set_descr(self, new_descr):

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
 in exactify(self)
   8431 left.exactify()
   8432 right.exactify()
-> 8433 gen = left._exact_field().union(right._exact_field())
   8434 left_value = gen(left._exact_value())
   8435 right_value = gen(right._exact_value())

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
 in union(self, other)
   3230 op = QQx(op)
   3231 # pari_nf = self._field.pari_nf()
-> 3232 pari_nf = self.pari_field()
   3233 factors = list(pari_nf.nffactor(op).lift())[0]
   3234 x, y = QQxy.gens()

/usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
 in 

Re: [sage-support] Re: Interact broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-01-29 Thread Dima Pasechnik
On Sat, Jan 29, 2022 at 8:05 PM 'Alan Stafford' via sage-support
 wrote:
>
> I only used Safari. Safari supports widgets at Cocalc so I can't think that 
> it won't support them should I run it locally. Interact has worked on 
> previous versions of SageMath. I am hoping the Mac support team will look 
> into this.

Cocalc has its own implementation for handling ipython notebooks. No
wonder that it might be totally different locally, with different code
handling notebook.

Can you try with Chrome?

>
> On Saturday, January 29, 2022 at 6:40:10 PM UTC dim...@gmail.com wrote:
>>
>> On Sat, Jan 29, 2022 at 6:28 PM kcrisman  wrote:
>> >
>> > Just for data points, which browsers did you try on this? Thanks for 
>> > reporting.
>>
>> for what's worth, the interact works on Linux with Firefox.
>>
>> >
>> > On Friday, January 28, 2022 at 1:02:57 PM UTC-5 alan_thoma...@yahoo.co.uk 
>> > wrote:
>> >>
>> >> Interact just calls the function but no Interact widgets appear.
>> >>
>> >> Example attached. It works at Cocalc.
>> >
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "sage-support" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an 
>> > email to sage-support...@googlegroups.com.
>> > To view this discussion on the web visit 
>> > https://groups.google.com/d/msgid/sage-support/e0a15937-dcd4-49aa-9dce-cda82b3e3fa0n%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/8f13034e-c737-4e4a-bc58-ceb6d7177281n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAAWYfq0t7sTrO_9%2Bmq06-rm6sBvtfbg%2BAwaFShCkeUk%3DNDDykw%40mail.gmail.com.


Re: [sage-support] Re: Interact broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-01-29 Thread Dima Pasechnik
On Sat, Jan 29, 2022 at 6:28 PM kcrisman  wrote:
>
> Just for data points, which browsers did you try on this?  Thanks for 
> reporting.

for what's worth, the interact works on Linux with Firefox.

>
> On Friday, January 28, 2022 at 1:02:57 PM UTC-5 alan_thoma...@yahoo.co.uk 
> wrote:
>>
>> Interact just calls the function but no Interact widgets appear.
>>
>> Example attached. It works at Cocalc.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/e0a15937-dcd4-49aa-9dce-cda82b3e3fa0n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAAWYfq2FjTz7rwn6421o50VqsAbymn__uUr3gqrpVrS3X%2BOZTQ%40mail.gmail.com.


Re: [sage-support] Re: Interact broken. SageMath 9.5 on Apple Mac OSX 12.1 . SageMath-9.5_x86_64

2022-01-29 Thread 'Alan Stafford' via sage-support
Exactly the same using Google Chrome.

On Saturday, January 29, 2022 at 8:09:36 PM UTC dim...@gmail.com wrote:

> On Sat, Jan 29, 2022 at 8:05 PM 'Alan Stafford' via sage-support
>  wrote:
> >
> > I only used Safari. Safari supports widgets at Cocalc so I can't think 
> that it won't support them should I run it locally. Interact has worked on 
> previous versions of SageMath. I am hoping the Mac support team will look 
> into this.
>
> Cocalc has its own implementation for handling ipython notebooks. No
> wonder that it might be totally different locally, with different code
> handling notebook.
>
> Can you try with Chrome?
>
> >
> > On Saturday, January 29, 2022 at 6:40:10 PM UTC dim...@gmail.com wrote:
> >>
> >> On Sat, Jan 29, 2022 at 6:28 PM kcrisman  wrote:
> >> >
> >> > Just for data points, which browsers did you try on this? Thanks for 
> reporting.
> >>
> >> for what's worth, the interact works on Linux with Firefox.
> >>
> >> >
> >> > On Friday, January 28, 2022 at 1:02:57 PM UTC-5 
> alan_thoma...@yahoo.co.uk wrote:
> >> >>
> >> >> Interact just calls the function but no Interact widgets appear.
> >> >>
> >> >> Example attached. It works at Cocalc.
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google 
> Groups "sage-support" group.
> >> > To unsubscribe from this group and stop receiving emails from it, 
> send an email to sage-support...@googlegroups.com.
> >> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/e0a15937-dcd4-49aa-9dce-cda82b3e3fa0n%40googlegroups.com
> .
> >
> > --
> > You received this message because you are subscribed to the Google 
> Groups "sage-support" group.
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to sage-support...@googlegroups.com.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/8f13034e-c737-4e4a-bc58-ceb6d7177281n%40googlegroups.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/3697bc17-3e05-45b0-940a-97c054928617n%40googlegroups.com.


[sage-support] Segfault with conda installation of SageMath-9.3 and 9.4 on Mac OS X

2022-01-29 Thread Matthias Goerner
I am getting a crash when I am running 
SnapPy's https://github.com/3-manifolds/SnapPy test suite against SageMath 
with the stack trace below.
I created several different conda environments, all with python 3.9.9, on 
Mac OS 11.5.2 x86_64 and it seems to be related to the (cy)pari version. 
That is, I can fix the crash or recreate the crash by changing the 
environment with "conda install pari==2.11.4" or "conda install 2.13.2". 
Those commands change the packages as follows:

  added / updated specs:
- pari==2.11.4


The following packages will be DOWNGRADED:

  cypari2  2.1.2-py39hbeebeb8_3 --> 
2.1.2-py39he58a9ab_0
  cysignals   1.11.2-py39h7972417_0 --> 
1.10.3-py39h520947a_0
  eclib 20210503-h06317ce_2 --> 
20210503-h5af3530_0
  giac  1.6.0.47-h3e19eb6_2 --> 
1.6.0.47-h5514456_0
  lcalc  1.23-he3dd645_1006 --> 
1.23-h3e22c04_1004
  pari2.13.2-h491590d_1_pthread --> 
2.11.4-h797e938_2
  sagelib9.3-py39hf07016b_5 --> 
9.3-py39h2a6771f_4

l also tried Marc Culler's Sage releases 
(https://github.com/3-manifolds/Sage_macOS/releases), version 9.4 and 9.5 
prerelease. The crash didn't happen in either version. I think those use 
pari 2.13.1 and 2.13.3.

Hmmm... I noted that the downgrading that fixed the crash removed 
"_pthread" from the pari version. So maybe pthread support causes the crash.

Here is the stacktrace:

* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x7fff203b84c2 libsystem_kernel.dylib`__kill + 10
frame #1: 0x00010ffd40ac libpari-gmp-tls.dylib`pari_err + 4940
frame #2: 0x00010fca26ec libpari-gmp-tls.dylib`_gtopoly + 172
frame #3: 0x0001169ec422 
gen.cpython-39-darwin.so`__pyx_pf_7cypari2_3gen_8Gen_base_14Polrev 
+ 178
frame #4: 0x00010f7b450c 
signals.cpython-39-darwin.so`__Pyx_CyFunction_CallAsMethod 
+ 92
frame #5: 0x000118534c77 
polynomial_element.cpython-39-darwin.so`__Pyx_PyObject_Call2Args 
+ 215
frame #6: 0x0001185972cf 
polynomial_element.cpython-39-darwin.so`__pyx_pw_4sage_5rings_10polynomial_18polynomial_element_10Polynomial_221_pari_with_name
 
+ 1071
frame #7: 0x00010f0b1f24 python`cfunction_call + 52
frame #8: 0x000118534ea3 
polynomial_element.cpython-39-darwin.so`__Pyx_PyObject_CallOneArg 
+ 339
frame #9: 0x0001185967a2 
polynomial_element.cpython-39-darwin.so`__pyx_pw_4sage_5rings_10polynomial_18polynomial_element_10Polynomial_217__pari__
 
+ 386
frame #10: 0x000118535904 
polynomial_element.cpython-39-darwin.so`__Pyx_PyObject_CallNoArg 
+ 132
frame #11: 0x000118598497 
polynomial_element.cpython-39-darwin.so`__pyx_pw_4sage_5rings_10polynomial_18polynomial_element_10Polynomial_231resultant
 
+ 551
frame #12: 0x00010f060bd5 python`method_vectorcall_O + 117
frame #13: 0x0001108491d4 
element.cpython-39-darwin.so`__pyx_pw_4sage_9structure_7element_12coerce_binop_1new_method
 
+ 1208
frame #14: 0x00010f051288 python`_PyObject_MakeTpCall + 136
frame #15: 0x00010f055d9e python`method_vectorcall + 686
frame #16: 0x00010f186e4f python`call_function + 175
frame #17: 0x00010f184940 python`_PyEval_EvalFrameDefault + 44816
frame #18: 0x00010f1781e4 python`_PyEval_EvalCode + 548
frame #19: 0x00010f05272b python`_PyFunction_Vectorcall + 427
frame #20: 0x00010f186e4f python`call_function + 175
frame #21: 0x00010f184972 python`_PyEval_EvalFrameDefault + 44866
frame #22: 0x00010f1781e4 python`_PyEval_EvalCode + 548
frame #23: 0x00010f05272b python`_PyFunction_Vectorcall + 427
frame #24: 0x00010f186e4f python`call_function + 175
frame #25: 0x00010f184972 python`_PyEval_EvalFrameDefault + 44866
frame #26: 0x00010f1781e4 python`_PyEval_EvalCode + 548
frame #27: 0x00010f05272b python`_PyFunction_Vectorcall + 427
frame #28: 0x00010f186e4f python`call_function + 175
frame #29: 0x00010f184972 python`_PyEval_EvalFrameDefault + 44866
frame #30: 0x00010f052672 python`_PyFunction_Vectorcall + 242
frame #31: 0x00010f186e4f python`call_function + 175
frame #32: 0x00010f184972 python`_PyEval_EvalFrameDefault + 44866
frame #33: 0x00010f052672 python`_PyFunction_Vectorcall + 242
frame #34: 0x00010f186e4f python`call_function + 175
frame #35: 0x00010f184972 python`_PyEval_EvalFrameDefault + 44866
frame #36: 0x00010f1781e4 python`_PyEval_EvalCode + 548
frame #37: 0x00010f05272b python`_PyFunction_Vectorcall + 427
frame #38: 0x00010f186e4f python`call_function + 175
frame #39: 0x00010f184a2b python`_PyEval_EvalFrameDefault + 45051
frame #40: 0x00010f1781e4 python`_PyEval_EvalCode + 548
frame #41: 0x00010f05272b 

[sage-support] Re: Eigen spaces of algebraic matrices broken ?

2022-01-29 Thread Emmanuel Charpentier


FWIW, upgrading to 9.5.rc4 *and disabling the use of system’s pari and 
singular* gives the same symptoms. Possible suspect :

charpent@zen-book-flip:~$ sage -pip list | grep pari
cypari2   2.1.2

I’m way out of my depth here…

HTH,
​
Le samedi 29 janvier 2022 à 22:51:14 UTC+1, Emmanuel Charpentier a écrit :

> The promlem seems tolie wit (my use of) polynomial rings to compute the 
> eigenvectors. Manually, after executing
>
> dims = M.dimensions()
> if dims[0] != dims[1]: raise DomainError("Not a square matrix !")
> dim = dims[0]
> BR = M.base_ring()
> try:
> WR = BR.algebraic_closure()
> except AttributeError:
> WR = BR
> WPR = WR["t"]
> t = WPR.gens()[0]
> # CP = WPR(M.charpoly(var="t"))
> # Eigenvalues
> CP = M.charpoly(var="t")
> lambdas = CP.roots(ring=WR)
> # Eigenvectors
> Id = identity_matrix(WR,dim)
> WM = M.apply_map(lambda u:WR(u))
> PR = PolynomialRing(WR,list(("v%d"%u for u in range(dim
> J=PR.ideal(*(WM-Id*lambdas[0][0])*vector(PR.gens()))
>
> neither J.dimension() nor J.variety() returns ; the interruption gives :
>
> sage: J.dimension()
>   C-c 
> C-c---
> KeyboardInterrupt Traceback (most recent call last)
>  in 
> > 1 J.dimension()
>
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/polynomial/multi_polynomial_ideal.py
>  in __call__(self, *args, **kwds)
> 295 if not R.base_ring().is_field():
> 296 raise ValueError("Coefficient ring must be a field for 
> function '%s'."%(self.f.__name__))
> --> 297 return self.f(self._instance, *args, **kwds)
> 298 
> 299 require_field = RequireField
>
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar_decorators.py
>  in wrapper(*args, **kwds)
> 111 # same_field=True might trigger an exception otherwise.
> 112 
> --> 113 numfield, new_elems, morphism = 
> number_field_elements_from_algebraics(orig_elems, same_field=True, 
> minimal=True)
> 114 
> 115 elem_dict = dict(zip(orig_elems, new_elems))
>
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
>  in number_field_elements_from_algebraics(numbers, minimal, same_field, 
> embedded, prec)
>2759 real_numbers = []
>2760 for v in numbers:
> -> 2761 if v._exact_field().is_complex() and real_case:
>2762 # the number comes from a complex algebraic number field
>2763 embedded_rt = v.interval_fast(RealIntervalField(prec))
>
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
>  in _exact_field(self)
>4428 if isinstance(sd, (ANRational, ANExtensionElement)):
>4429 return sd.generator()
> -> 4430 self.exactify()
>4431 return self._exact_field()
>4432 
>
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
>  in exactify(self)
>4363 if isinstance(od, (ANRational, ANExtensionElement)):
>4364 return
> -> 4365 self._set_descr(self._descr.exactify())
>4366 
>4367 def _set_descr(self, new_descr):
>
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
>  in exactify(self)
>8180 
>8181 if op == 'real':
> -> 8182 arg.exactify()
>8183 rv = (arg + arg.conjugate()) / 2
>8184 rv.exactify()
>
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
>  in exactify(self)
>4363 if isinstance(od, (ANRational, ANExtensionElement)):
>4364 return
> -> 4365 self._set_descr(self._descr.exactify())
>4366 
>4367 def _set_descr(self, new_descr):
>
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
>  in exactify(self)
>8429 left = self._left
>8430 right = self._right
> -> 8431 left.exactify()
>8432 right.exactify()
>8433 gen = left._exact_field().union(right._exact_field())
>
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
>  in exactify(self)
>4363 if isinstance(od, (ANRational, ANExtensionElement)):
>4364 return
> -> 4365 self._set_descr(self._descr.exactify())
>4366 
>4367 def _set_descr(self, new_descr):
>
> /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py
>  in exactify(self)
>8431 left.exactify()
>8432 right.exactify()
> -> 8433 gen = left._exact_field().union(right._exact_field())
>8434