You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
If I call mmio.write() when
data
is an instance ofnp.uint32
, the method raises a ValueError. This is funky, because the value ofdata
is cast to annp.uint32
when it is written to thearray
member variable inside the method.I fixed this in my own code by adding:
But you might find a better solution (Hence, a raised issue, and not a PR)
The text was updated successfully, but these errors were encountered: