-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
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
Error with GF.Elements()
with dtype=object
#186
Labels
bug
Something isn't working
Comments
After #189, the above returns this, which is expected. It doesn't error where it did before. Instead, it complains that it doesn't have enough RAM, which it doesn't. In [1]: import galois
In [2]: GF = galois.GF(2**100)
In [3]: GF.Elements()
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-3-d052cf0ab5c9> in <module>
----> 1 GF.Elements()
~/repos/galois/galois/_fields/_array.py in Elements(cls, dtype)
446 GF.display();
447 """
--> 448 return cls.Range(0, cls.order, step=1, dtype=dtype)
449
450 @classmethod
~/repos/galois/galois/_fields/_array.py in Range(cls, start, stop, step, dtype)
359 raise ValueError(f"The stopping value must be less than the field order of {cls.order}, not {stop}.")
360 dtype = cls._get_dtype(dtype)
--> 361 array = np.arange(start, stop, step=step, dtype=dtype)
362 return array.view(cls)
363
ValueError: Maximum allowed size exceeded |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As discovered in #185, calling
GF.Elements()
(orGF.Range()
) on a "large" finite field, withdtype=object
, results in an error. WhileGF.Elements()
wouldn't want to be called on such a large field,GF.Range()
might.The text was updated successfully, but these errors were encountered: