Closed tunnell closed 6 years ago
@feigaodm @JelleAalbers thoughts? needs approval, ready to merge
I'm surprised numpy deprecated this. frombuffer
has the 'feature' that if you pass it an immutable object (such as a bytes
) the resulting array will also be readonly. That can cause some interesting failures; the solution is probably to copy things into a bytearray first. But since the test pass, we could just wait if something will go wrong now...
haha, @JelleAalbers sorry if I merged too fast because I see @tunnell was doing a lot of commits and it might be urgent. But as you said, we will see if it brings new problems and fix them
Regardless, we need a solution due to the deprecation warning. If it produces a bug, we can look at a better way to fix it. It just deprecated fromstring for byte strings.
Also, it's mainly the XED thing that we should probably deprecate anyways at some point, even though it's used for all tests
frombuffer is now preferred within numpy when dealing with binary data. This solves "DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead"