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--------------------------------------------------------------------------- AttributeError Traceback (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 = <object>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) <ipython-input-344-ff7c46010ad2> in <module> ----> 1 AA3=test(Size=Integer(3), Ring=AA) <string> 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) /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.echelon_form (build/cythonized/sage/matrix/matrix2.c:52440)() 7686 E = self.__copy__() 7687 if algorithm == 'default': -> 7688 v = E.echelonize(cutoff=cutoff, **kwds) 7689 else: 7690 v = E.echelonize(algorithm = algorithm, cutoff=cutoff, **kwds) /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.echelonize (build/cythonized/sage/matrix/matrix2.c:51817)() 7583 if self.base_ring() in _Fields: 7584 if algorithm in ['classical', 'partial_pivoting', 'scaled_partial_pivoting', 'scaled_partial_pivoting_valuation']: -> 7585 self._echelon_in_place(algorithm) 7586 elif algorithm == 'strassen': 7587 self._echelon_strassen(cutoff) /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._echelon_in_place (build/cythonized/sage/matrix/matrix2.c:53308)() 7848 sig_check() 7849 for r in range(start_row, nr): -> 7850 if A.get_unsafe(r, c): 7851 pivots.append(c) 7852 a_inverse = ~A.get_unsafe(r, c) /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py in __bool__(self) 4043 right = sd._right if op is operator.sub else -sd._right 4044 -> 4045 lp = left.minpoly() 4046 rp = right.minpoly() 4047 if lp != rp: /usr/local/sage-9/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/rings/qqbar.py in minpoly(self) 4493 return self._minimal_polynomial 4494 except AttributeError: -> 4495 self.exactify() 4496 self._minimal_polynomial = self._descr.minpoly() 4497 return self._minimal_polynomial /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) 8430 right = self._right 8431 left.exactify() -> 8432 right.exactify() 8433 gen = left._exact_field().union(right._exact_field()) 8434 left_value = gen(left._exact_value()) /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) 8430 right = self._right 8431 left.exactify() -> 8432 right.exactify() 8433 gen = left._exact_field().union(right._exact_field()) 8434 left_value = gen(left._exact_value()) /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) 8430 right = self._right 8431 left.exactify() -> 8432 right.exactify() 8433 gen = left._exact_field().union(right._exact_field()) 8434 left_value = gen(left._exact_value()) /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) 8176 8177 if op == '~': -> 8178 arg.exactify() 8179 return arg._descr.invert(None) 8180 /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 pari_field(self) 3134 if self._pari_field is None: 3135 pari_pol = self._field.pari_polynomial("y") -> 3136 self._pari_field = pari_pol.nfinit(1) 3137 return self._pari_field 3138 cypari2/auto_gen.pxi in cypari2.gen.Gen_base.nfinit() KeyboardInterrupt: Any hint appreciated… -- 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/15ee9b9a-5ffa-4aa4-b8b9-019d81c447b7n%40googlegroups.com.