We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e50cda6 commit d1f10f4Copy full SHA for d1f10f4
src/flint/types/_gr.pyx
@@ -1661,6 +1661,18 @@ cdef class gr(flint_scalar):
1661
def __repr__(self):
1662
return self.ctx.to_str(self)
1663
1664
+ def parent(self) -> gr_ctx:
1665
+ """
1666
+ Return the parent context.
1667
+
1668
+ >>> from flint.types._gr import gr_complex_acb_ctx
1669
+ >>> acb = gr_complex_acb_ctx.new(53)
1670
+ >>> x = acb("pi")
1671
+ >>> x.parent()
1672
+ gr_complex_acb_ctx(53)
1673
1674
+ return self.ctx
1675
1676
def is_zero(self):
1677
"""Return whether the element is zero (may return ``None``).
1678
0 commit comments