Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Trac #17194: Fix RealBallField._an_element_
Browse files Browse the repository at this point in the history
Was broken and undocumented.
  • Loading branch information
cheuberg committed Feb 16, 2015
1 parent 9e26152 commit 1196b57
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/sage/rings/real_arb.pyx
Expand Up @@ -262,7 +262,17 @@ class RealBallField(UniqueRepresentation, Parent):
return self.element_class(self, *args, **kwds)

def _an_element_(self):
return self._element_constructor_(self)
r"""
Construct an element.
EXAMPLES::
sage: from sage.rings.real_arb import RealBallField # optional: arb
sage: RBF = RealBallField() # optional: arb
sage: RBF._an_element_() # optional: arb; indirect doctest
[0.3333333333333333 +/- 1.49e-17]
"""
return self(1.0/3)

def precision(self):
"""
Expand Down

0 comments on commit 1196b57

Please sign in to comment.