From 0bb5cfe4539e6bb45dc84ac0c0a7cd52b97cafac Mon Sep 17 00:00:00 2001 From: Sebastian Spindler Date: Sun, 28 Jan 2024 00:16:14 +0100 Subject: [PATCH] Fixed typo and corrected/modified docstrings --- .../algebras/quatalg/quaternion_algebra.py | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index 01c84d4e821..06083f287e0 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -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 @@ -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:: @@ -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") F = self.base_ring() @@ -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:: @@ -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 """ @@ -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 """