Advertisement
Guest User

Untitled

a guest
Oct 21st, 2022
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.14 KB | None | 0 0
  1. sage/rings/number_field/number_field_element_quadratic.pyx:7: DeprecationWarning: invalid escape sequence '\Q'
  2. """
  3. sage/rings/number_field/number_field_element_quadratic.pyx:7: DeprecationWarning: invalid escape sequence '\Q'
  4. """
  5. ---------------------------------------------------------------------------
  6. TypeError Traceback (most recent call last)
  7. Cell In [5], line 1
  8. ----> 1 QuaternionOrder(A, [Integer(1), Integer(3)*i, Integer(1)/Integer(2)*w + Integer(1)/Integer(2) + (Integer(3)/Integer(2)*w + Integer(1))*i + Integer(1)/Integer(2)*j, Integer(1)/Integer(2)*w + (Integer(3)/Integer(2)*w - Integer(1)/Integer(2))*i + Integer(1)/Integer(2)*k])
  9.  
  10. File /usr/lib/python3.10/site-packages/sage/algebras/quatalg/quaternion_algebra.py:1417, in QuaternionOrder.__init__(self, A, basis, check)
  11. 1414 raise ValueError("lattice must contain 1")
  12. 1416 # check if multiplicatively closed
  13. -> 1417 Y = matrix(QQ, 16, 4, [(x*y).coefficient_tuple()
  14. 1418 for x in basis for y in basis])
  15. 1419 X = M.solve_left(Y)
  16. 1420 if any(a not in O for x in X for a in x):
  17.  
  18. File /usr/lib/python3.10/site-packages/sage/matrix/constructor.pyx:643, in sage.matrix.constructor.matrix (build/cythonized/sage/matrix/constructor.c:2731)()
  19. 641 """
  20. 642 immutable = kwds.pop('immutable', False)
  21. --> 643 M = MatrixArgs(*args, **kwds).matrix()
  22. 644 if immutable:
  23. 645 M.set_immutable()
  24.  
  25. File /usr/lib/python3.10/site-packages/sage/matrix/args.pyx:667, in sage.matrix.args.MatrixArgs.matrix (build/cythonized/sage/matrix/args.c:8012)()
  26. 665 break
  27. 666 else:
  28. --> 667 M = self.space(self, coerce=convert)
  29. 668
  30. 669 # Also store the matrix to support multiple calls of matrix()
  31.  
  32. File /usr/lib/python3.10/site-packages/sage/structure/parent.pyx:900, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9485)()
  33. 898 return mor._call_(x)
  34. 899 else:
  35. --> 900 return mor._call_with_args(x, args, kwds)
  36. 901
  37. 902 raise TypeError(_LazyString(_lazy_format, ("No conversion defined from %s to %s", R, self), {}))
  38.  
  39. File /usr/lib/python3.10/site-packages/sage/structure/coerce_maps.pyx:180, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (build/cythonized/sage/structure/coerce_maps.c:5265)()
  40. 178 print(type(C), C)
  41. 179 print(type(C._element_constructor), C._element_constructor)
  42. --> 180 raise
  43. 181
  44. 182
  45.  
  46. File /usr/lib/python3.10/site-packages/sage/structure/coerce_maps.pyx:170, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (build/cythonized/sage/structure/coerce_maps.c:5055)()
  47. 168 return C._element_constructor(x)
  48. 169 else:
  49. --> 170 return C._element_constructor(x, **kwds)
  50. 171 else:
  51. 172 if len(kwds) == 0:
  52.  
  53. File /usr/lib/python3.10/site-packages/sage/matrix/matrix_space.py:925, in MatrixSpace._element_constructor_(self, entries, **kwds)
  54. 815 def _element_constructor_(self, entries, **kwds):
  55. 816 """
  56. 817 Construct an element of ``self`` from ``entries``.
  57. 818
  58. (...)
  59. 923 False
  60. 924 """
  61. --> 925 return self.element_class(self, entries, **kwds)
  62.  
  63. File /usr/lib/python3.10/site-packages/sage/matrix/matrix_rational_dense.pyx:192, in sage.matrix.matrix_rational_dense.Matrix_rational_dense.__init__ (build/cythonized/sage/matrix/matrix_rational_dense.cpp:4962)()
  64. 190 ma = MatrixArgs_init(parent, entries)
  65. 191 cdef Rational z
  66. --> 192 for t in ma.iter(coerce, True):
  67. 193 se = <SparseEntry>t
  68. 194 z = <Rational>se.entry
  69.  
  70. File /usr/lib/python3.10/site-packages/sage/matrix/args.pyx:521, in iter (build/cythonized/sage/matrix/args.c:6532)()
  71. 519 x = next(row)
  72. 520 if convert and self.need_to_convert(x):
  73. --> 521 x = self.base(x)
  74. 522 if sparse:
  75. 523 yield make_SparseEntry(i, j, x)
  76.  
  77. File /usr/lib/python3.10/site-packages/sage/structure/parent.pyx:898, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9458)()
  78. 896 if mor is not None:
  79. 897 if no_extra_args:
  80. --> 898 return mor._call_(x)
  81. 899 else:
  82. 900 return mor._call_with_args(x, args, kwds)
  83.  
  84. File /usr/lib/python3.10/site-packages/sage/structure/coerce_maps.pyx:161, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4734)()
  85. 159 print(type(C), C)
  86. 160 print(type(C._element_constructor), C._element_constructor)
  87. --> 161 raise
  88. 162
  89. 163 cpdef Element _call_with_args(self, x, args=(), kwds={}):
  90.  
  91. File /usr/lib/python3.10/site-packages/sage/structure/coerce_maps.pyx:156, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4626)()
  92. 154 cdef Parent C = self._codomain
  93. 155 try:
  94. --> 156 return C._element_constructor(x)
  95. 157 except Exception:
  96. 158 if print_warnings:
  97.  
  98. File /usr/lib/python3.10/site-packages/sage/rings/rational.pyx:538, in sage.rings.rational.Rational.__init__ (build/cythonized/sage/rings/rational.cpp:6529)()
  99. 536 """
  100. 537 if x is not None:
  101. --> 538 self.__set_value(x, base)
  102. 539
  103. 540 def __reduce__(self):
  104.  
  105. File /usr/lib/python3.10/site-packages/sage/rings/rational.pyx:626, in sage.rings.rational.Rational.__set_value (build/cythonized/sage/rings/rational.cpp:7657)()
  106. 624
  107. 625 elif hasattr(x, "_rational_"):
  108. --> 626 set_from_Rational(self, x._rational_())
  109. 627
  110. 628 elif isinstance(x, tuple) and len(x) == 2:
  111.  
  112. File /usr/lib/python3.10/site-packages/sage/rings/number_field/number_field_element_quadratic.pyx:1713, in sage.rings.number_field.number_field_element_quadratic.NumberFieldElement_quadratic._rational_ (build/cythonized/sage/rings/number_field/number_field_element_quadratic.cpp:15940)()
  113. 1711 cdef Rational res
  114. 1712 if mpz_cmp_ui(self.b, 0)!=0:
  115. -> 1713 raise TypeError("Unable to coerce %s to a rational" % self)
  116. 1714 else:
  117. 1715 res = <Rational>Rational.__new__(Rational)
  118.  
  119. TypeError: Unable to coerce 1/2*w + 1/2 to a rational
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement