@@ -37,15 +37,15 @@ def __init__(
3737 verify_isinstance (systematic , bool )
3838
3939 if not n >= k :
40- raise ValueError (f"Argument `n` must be greater than or equal to `k` , { n } is not greater than { k } ." )
40+ raise ValueError (f"Argument 'n' must be greater than or equal to 'k' , { n } is not greater than { k } ." )
4141 if not d >= 1 :
42- raise ValueError (f"Argument `d` must be at least 1, not { d } ." )
42+ raise ValueError (f"Argument 'd' must be at least 1, not { d } ." )
4343 if not type (G ) is type (H ):
44- raise ValueError (f"Arguments `G` and `H` must be over the same field, not { type (G )} and { type (H )} ." )
44+ raise ValueError (f"Arguments 'G' and 'H' must be over the same field, not { type (G )} and { type (H )} ." )
4545 if not G .shape == (k , n ):
46- raise ValueError (f"Argument `G` must be have shape (k, n), { G .shape } is not ({ k } , { n } )." )
46+ raise ValueError (f"Argument 'G' must be have shape (k, n), { G .shape } is not ({ k } , { n } )." )
4747 if not H .shape == (n - k , n ):
48- raise ValueError (f"Argument `H` must be have shape (n - k, n), { H .shape } is not ({ n - k } , { n } )." )
48+ raise ValueError (f"Argument 'H' must be have shape (n - k, n), { H .shape } is not ({ n - k } , { n } )." )
4949
5050 self ._n = n
5151 self ._k = k
@@ -78,7 +78,7 @@ def encode(self, message: ArrayLike, output: Literal["codeword", "parity"] = "co
7878 verify_literal (output , ["codeword" , "parity" ])
7979
8080 if output == "parity" and not self .is_systematic :
81- raise ValueError ("Argument ` output` may only be 'parity' for systematic codes." )
81+ raise ValueError ("Argument ' output' may only be 'parity' for systematic codes." )
8282
8383 message , is_message_1d = self ._check_and_convert_message (message )
8484 codeword = self ._encode_message (message )
@@ -207,10 +207,10 @@ def _check_and_convert_message(self, message: ArrayLike) -> tuple[FieldArray, bo
207207 message = self .field (message )
208208
209209 if message .ndim > 2 :
210- raise ValueError (f"Argument ` message` can be either 1-D or 2-D, not { message .ndim } -D." )
210+ raise ValueError (f"Argument ' message' can be either 1-D or 2-D, not { message .ndim } -D." )
211211 if not 1 <= message .shape [- 1 ] <= self .k :
212212 raise ValueError (
213- f"The ` message` must be a 1-D or 2-D array with last dimension between 1 and { self .k } , "
213+ f"Argument ' message' must be a 1-D or 2-D array with last dimension between 1 and { self .k } , "
214214 f"not shape { message .shape } ."
215215 )
216216
@@ -229,7 +229,7 @@ def _check_and_convert_codeword(self, codeword: FieldArray) -> FieldArray:
229229
230230 if not self .n - self .k + 1 <= codeword .shape [- 1 ] <= self .n :
231231 raise ValueError (
232- f"The argument ` codeword` must be a 1-D or 2-D array with last dimension between { self .n - self .k + 1 } "
232+ f"Argument ' codeword' must be a 1-D or 2-D array with last dimension between { self .n - self .k + 1 } "
233233 f"and { self .n } , not shape { codeword .shape } ."
234234 )
235235
0 commit comments