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

Pyodide Numpy Int Array Bug #14

Open
ghabs opened this issue Jul 16, 2021 · 0 comments
Open

Pyodide Numpy Int Array Bug #14

ghabs opened this issue Jul 16, 2021 · 0 comments

Comments

@ghabs
Copy link

ghabs commented Jul 16, 2021

User report: The numpy.random.choice function is failing.

The problem is caused by Pyodide not converting numpy types properly. The numpy.random.choice function returns an numpy.int32 type which gets converted to an empty array for some reason.

Mitigation: Use random.choice or convert the numpy choice to a python int.

@vilkinsons vilkinsons transferred this issue from hashintel/hash Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants