Skip to content

Commit 01cded9

Browse files
author
Matthias Koeppe
committed
src/sage/structure/element.pyx: Fix up
1 parent 9911481 commit 01cded9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sage/structure/element.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4053,7 +4053,7 @@ cdef class PrincipalIdealDomainElement(DedekindDomainElement):
40534053
right = py_scalar_to_element(right)
40544054
if not isinstance(right, Element):
40554055
right = right.sage()
4056-
from sage.arith.misc import GCD as gcd
4056+
if not ((<Element>right)._parent is self._parent):
40574057
from sage.arith.misc import GCD as gcd
40584058
return coercion_model.bin_op(self, right, gcd)
40594059
return self._gcd(right)
@@ -4087,7 +4087,7 @@ cdef class PrincipalIdealDomainElement(DedekindDomainElement):
40874087
right = py_scalar_to_element(right)
40884088
if not isinstance(right, Element):
40894089
right = right.sage()
4090-
from sage.arith.functions import lcm
4090+
if not ((<Element>right)._parent is self._parent):
40914091
from sage.arith.functions import lcm
40924092
return coercion_model.bin_op(self, right, lcm)
40934093
return self._lcm(right)

0 commit comments

Comments
 (0)