Thanks for reporting this. From looking around, it looks like this was the consequence of a bug-fix in NumPy 1.16:
``` Arrays based off readonly buffers cannot be set writeable ------------------------------------------------------------- We now disallow setting the writeable flag True on arrays created from fromstring(readonly-buffer). ``` PR in Numpy here: https://github.com/numpy/numpy/pull/11739 I am not familiar with the code in sequence.py but maybe @ebolyen can have a look? From some tinkering in the console, it looks like copying the data into a byte array and then passing that to `np.frombuffer` should suffice. For example: This is what we have in _sequence.py. ``` # this fails 👎 In [1]: import numpy as np ...: s = 'asdf'.encode('ascii') ...: x = np.frombuffer(s, dtype=np.uint8) ...: In [2]: x.flags.writeable = True --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-2-95da424ff829> in <module> ----> 1 x.flags.writeable = True ValueError: cannot set WRITEABLE flag to True of this array ``` This is as inspired from some comments in the NumPy PR: ``` # this works 👍 In [3]: q = bytearray(4) In [4]: q[:] = 'asdf'.encode('ascii') In [10]: x = np.frombuffer(q, dtype=np.uint8) In [11]: x.flags.writeable = True ``` -------------- This is the [failing unit test](https://github.com/biocore/scikit-bio/blob/master/skbio/sequence/tests/test_grammared_sequence.py#L238). -- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/biocore/scikit-bio/issues/1648#issuecomment-452862428