Skip to content

Commit

Permalink
Fixed typo and corrected/modified docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
S17A05 committed Jan 28, 2024
1 parent 97f1257 commit 0bb5cfe
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/sage/algebras/quatalg/quaternion_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ def is_totally_definite(self):
sage: QuaternionAlgebra(F, 2*a, F(-1)).is_totally_definite()
False
sage: QuaternionAlgebra(RR(2.),1).is_definite()
sage: QuaternionAlgebra(RR(2.),1).is_totally_definite()
Traceback (most recent call last):
...
ValueError: base field must be rational numbers or a number field
Expand Down Expand Up @@ -1116,10 +1116,11 @@ def ramified_places(self, inf=True):
OUTPUT:
The non-Archimedean (AKA finite) places at which ``self`` ramifies (given as elements of ZZ if
``self`` is defined over the rational field QQ, respectively as fractional ideals of the number
field's ring of integers, otherwise) and, if ``inf`` is set to ``True``, also the Archimedean
(AKA infinite) places at which ``self`` ramifies (given by real embeddings of the base field).
The non-Archimedean (AKA finite) places at which ``self`` ramifies (given as elements of ZZ,
sorted small to large, if ``self`` is defined over the rational field QQ, respectively as
fractional ideals of the number field's ring of integers, otherwise) and, if ``inf`` is set
to ``True``, also the Archimedean (AKA infinite) places at which ``self`` ramifies (given
by real embeddings of the base field).
EXAMPLES::
Expand Down Expand Up @@ -1161,11 +1162,11 @@ def ramified_places(self, inf=True):
sage: QuaternionAlgebra(QQ[sqrt(2)], 3, 19).ramified_places() # needs sage.symbolic
([], [])
sage: QuaternionAlgebra(RR(2.),1).ramified_places()
Traceback (most recent call last)
Traceback (most recent call last):
...
ValueError: base field must be rational numbers or a number field
"""
if not isinstace(inf, bool):
if not isinstance(inf, bool):
raise ValueError("inf must be a truth value")

Check warning on line 1170 in src/sage/algebras/quatalg/quaternion_algebra.py

View check run for this annotation

Codecov / codecov/patch

src/sage/algebras/quatalg/quaternion_algebra.py#L1170

Added line #L1170 was not covered by tests

F = self.base_ring()
Expand Down Expand Up @@ -1207,7 +1208,7 @@ def ramified_primes(self):
OUTPUT:
The list of finite primes at which ``self`` ramifies; given as integers, sorted
small-to-large, if ``self`` is defined over QQ, and as fractional ideals in the
small to large, if ``self`` is defined over QQ, and as fractional ideals in the
ring of integers of the base number field otherwise.
EXAMPLES::
Expand All @@ -1230,7 +1231,7 @@ def ramified_primes(self):
[Fractional ideal (2)]
sage: QuaternionAlgebra(RR(2.),1).ramified_primes()
Traceback (most recent call last)
Traceback (most recent call last):
...
ValueError: base field must be rational numbers or a number field
"""
Expand Down Expand Up @@ -1273,7 +1274,7 @@ def discriminant(self):
Fractional ideal (1)
sage: QuaternionAlgebra(RR(2.),1).discriminant()
Traceback (most recent call last)
Traceback (most recent call last):
...
ValueError: base field must be rational numbers or a number field
"""
Expand Down

0 comments on commit 0bb5cfe

Please sign in to comment.