Skip to content
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 -- high is out of bounds for int32 #2

Open
Khoshmehr opened this issue Jun 23, 2023 · 0 comments
Open

Error -- high is out of bounds for int32 #2

Khoshmehr opened this issue Jun 23, 2023 · 0 comments

Comments

@Khoshmehr
Copy link

Hi, I am trying to run the Code for my university project. However, when I run it, I faced below error:

Python 3.9.13

Name: numpy
Version: 1.21.5

Name: nose
Version: 1.3.7

Name: scipy
Version: 1.9.1

Name: future
Version: 0.18.2

Name: autograd
Version: 1.6.1

from hdmm import workload, templates, error
W = workload.AllRange(256)
pid = templates.PIdentity(16, 256)
pid.optimize(W)
A = pid.strategy()
error.rootmse(W, A)


ValueError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_16020\1051682698.py in
1 r = 128
2 W = workload.AllRange(r)
----> 3 pid = templates.PIdentity(16, r)
4 pid.optimize(W)
5 A = pid.strategy()

~\Documents\hdmm\src\hdmm\templates.py in init(self, p, n, seed)
131 :param n: the domain size
132 """
--> 133 super(PIdentity, self).init(seed)
134
135 self._params = self.prng.rand(p*n)

~\Documents\hdmm\src\hdmm\templates.py in init(self, seed)
27 def init(self, seed=None):
28 if seed is None:
---> 29 seed = np.random.randint(2**32-1)
30
31 self.prng = np.random.RandomState(seed)

mtrand.pyx in numpy.random.mtrand.RandomState.randint()

_bounded_integers.pyx in numpy.random._bounded_integers._rand_int32()

ValueError: high is out of bounds for int32

would you please advise me in this regard?
Best,
Mina

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant