Closed Bengt closed 3 years ago
That is not a decoding/encoding issue. It has to do with numpy a long time ago only having the tostring
method and not the tobytes
method. I used tostring
back then since it made the package compatible with the current numpy versions at the time as well as ones that were old at the time.
So, in principle, it is a trivial search-replace fix. That has already been done in the main branch. But such a solution cannot be done for the 0.1.x branch since that would be breaking compatibility. The 0.1.x branch cannot drop support for these old versions of numpy just as it can't drop support for python 2.6. So, such a change would be a major version increase rather than a bugfix release.
So, I applied a fix in commit f5ce66e in the 0.1.x branch that uses tobytes
on newer numpy versions where it is available and tostring
on older versions where it not.
The fixed version has been uploaded to PyPI as version 0.1.17
Awesome work. Thanks!
When running my tests, I see warnings like these:
This hints at decoding and encoding between bytes and strings, which might not be trivial to fix. Since that can be tricky in this project, I will not attempt to fix it myself, I fear.