diff --git a/src/galois/_codes/_bch.py b/src/galois/_codes/_bch.py index cb6e924fe..0dab344d7 100644 --- a/src/galois/_codes/_bch.py +++ b/src/galois/_codes/_bch.py @@ -175,9 +175,9 @@ def __init__( verify_isinstance(c, int) if d is not None and not d >= 1: - raise ValueError(f"Argument `d` must be at least 1, not {d}.") + raise ValueError(f"Argument 'd' must be at least 1, not {d}.") if not c >= 0: - raise ValueError(f"Argument `c` must be at least 0, not {c}.") + raise ValueError(f"Argument 'c' must be at least 0, not {c}.") if field is None: field = GF2 @@ -208,7 +208,7 @@ def __init__( # We know `d` wasn't provided, otherwise the previous `if` would have executed d = roots.size + 1 else: - raise ValueError("Argument `k` or `d` must be provided to define the code size.") + raise ValueError("Argument 'k' or 'd' must be provided to define the code size.") # Set BCH specific attributes self._extension_field = extension_field diff --git a/src/galois/_codes/_reed_solomon.py b/src/galois/_codes/_reed_solomon.py index f74f1f835..43f64e4ed 100644 --- a/src/galois/_codes/_reed_solomon.py +++ b/src/galois/_codes/_reed_solomon.py @@ -150,9 +150,9 @@ def __init__( verify_isinstance(systematic, bool) if d is not None and not d >= 1: - raise ValueError(f"Argument `d` must be at least 1, not {d}.") + raise ValueError(f"Argument 'd' must be at least 1, not {d}.") if not c >= 0: - raise ValueError(f"Argument `c` must be at least 0, not {c}.") + raise ValueError(f"Argument 'c' must be at least 0, not {c}.") if field is None: q = 2 @@ -170,13 +170,13 @@ def __init__( # Singleton bound, so the relationship between n, k, and d is precise. if d is not None and k is not None: if not d == n - k + 1: - raise ValueError("Arguments `k` and `d` were provided but are inconsistent. For Reed-Solomon codes, d = n - k + 1.") + raise ValueError("Arguments 'k' and 'd' were provided but are inconsistent. For Reed-Solomon codes, d = n - k + 1.") elif d is not None: k = n - (d - 1) elif k is not None: d = (n - k) + 1 else: - raise ValueError("Argument `k` or `d` must be provided to define the code size.") + raise ValueError("Argument 'k' or 'd' must be provided to define the code size.") roots = alpha ** (c + np.arange(0, d - 1)) generator_poly = Poly.Roots(roots)