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

mmio.write() does not accept numpy.uint32 as type of data argument #634

Closed
drichmond opened this issue May 22, 2018 · 1 comment
Closed
Assignees

Comments

@drichmond
Copy link
Contributor

If I call mmio.write() when data is an instance of np.uint32, the method raises a ValueError. This is funky, because the value of data is cast to an np.uint32 when it is written to the array member variable inside the method.

I fixed this in my own code by adding:

	if isinstance(data, (np.uint32, np.int32)):
            self._debug('Writing 4 bytes to offset {0:x}: {1:x}',
                        offset, data)
            self.array[idx] = data

But you might find a better solution (Hence, a raised issue, and not a PR)

@skalade
Copy link
Collaborator

skalade commented May 1, 2024

Closing this due to lack of activity. Please re-open as a post on discuss.pynq.io if this is still an issue.

@skalade skalade closed this as completed May 1, 2024
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

Successfully merging a pull request may close this issue.

3 participants