We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
verify_isinstance()
While implementing #458, I discovered this:
In [25]: list(galois.irreducible_polys(2, 5, terms=10.0)) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-25-72f6e34aff26> in <module> ----> 1 list(galois.irreducible_polys(2, 5, terms=10.0)) ~\repos\galois\src\galois\_polys\_irreducible.py in irreducible_polys(order, degree, terms, reverse) 172 173 generator = galois.irreducible_polys(3, 4, reverse=True); generator --> 174 next(generator) 175 next(generator) 176 next(generator) ~\repos\galois\src\galois\_helper.py in verify_isinstance(argument, types, optional) 22 args = string[string.find("(") + 1 : -1].split(",") 23 argument_name = args[0] ---> 24 raise TypeError(f"Argument {argument_name!r} must be an instance of {types}, not {type(argument)}.") 25 26 TypeError: Argument 'generator' must be an instance of <class 'int'>, not <class 'float'>.
The error should be:
TypeError: Argument `terms' must be an instance of <class 'int'>, not <class 'float'>.
The text was updated successfully, but these errors were encountered:
This must have been a temporary bug on my local branch. Currently, #463 runs as follows:
In [1]: import galois In [2]: list(galois.irreducible_polys(2, 5, terms=10.0)) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Input In [2], in <cell line: 1>() ----> 1 list(galois.irreducible_polys(2, 5, terms=10.0)) File /mnt/c/Users/matth/repos/galois/src/galois/_polys/_irreducible.py:187, in irreducible_polys(order, degree, terms, reverse) 185 verify_isinstance(order, int) 186 verify_isinstance(degree, int) --> 187 verify_isinstance(terms, int, optional=True) 188 verify_isinstance(reverse, bool) 190 if not is_prime_power(order): File /mnt/c/Users/matth/repos/galois/src/galois/_helper.py:24, in verify_isinstance(argument, types, optional) 22 args = string[string.find("(") + 1 : -1].split(",") 23 argument_name = args[0] ---> 24 raise TypeError(f"Argument {argument_name!r} must be an instance of {types}, not {type(argument)}.") TypeError: Argument 'terms' must be an instance of <class 'int'>, not <class 'float'>.
Sorry, something went wrong.
No branches or pull requests
While implementing #458, I discovered this:
The error should be:
The text was updated successfully, but these errors were encountered: