question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

high is out of bounds for int32.

See original GitHub issue

In knowledge_graph.py, np.random.RandomState, self._global_rs.randint(2 ** 32) but the maximum of positive int32 integer is 2**-1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
huonwcommented, Jun 10, 2020

Ah, thanks. That’s very helpful!

I guess you’re running on a 32-bit machine (print(np.int_) says <class 'numpy.int64'> for me, what does it say for you?), which indeed would fail here.

This should be an easy fix. I’ll do it now.

(BTW, your comment was very hard to read. I edited it to use fenced code blocks with ``` (see the “code” tab of https://guides.github.com/features/mastering-markdown/#examples ), which makes it much easier to understand. I hope that’s ok.)

0reactions
huonwcommented, Jun 11, 2020

This should be an easy fix. I’ll do it now.

https://github.com/stellargraph/stellargraph/pull/1671 contains the fix. It’s a patch directly on top of 1.1.0. It can be installed with pip install git+https://github.com/stellargraph/stellargraph.git@ b08348d94c593ac02c1445621884029c33a276ca (b08348d94c593ac02c1445621884029c33a276ca is the commit in that patch).

An alternative would be to upgrade to a 64-bit version of NumPy and/or Python (wherever the problem is).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Easiest way to generate random int64 array in numpy?
I just tried exactly the same and got high is out of bounds for int32 . My configuration is Windows 7 64-bit, Python...
Read more >
ValueError: low is out of bounds for int32 - tsfaker - GitLab
No tasks are currently assigned. Use tasks to break down this issue into smaller parts. Linked items. 0.
Read more >
Control.SetBoundsCore(Int32, Int32, Int32 ... - Microsoft Learn
The new Height property value of the control. specified: BoundsSpecified. A bitwise combination of the BoundsSpecified values. Examples. The following code ...
Read more >
int32-out-of-bounds.js - Apple Open Source
int32 -out-of-bounds.js [plain text]. function foo(a, i) { return a[i]; } noInline(foo); function test(value) { var result = foo([value], 0); if (result ...
Read more >
Differences between CuPy and NumPy
np.array([float('inf')], dtype=np.float32).astype(np.int32) ... CuPy handles out-of-bounds indices differently by default from NumPy when using integer ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found