4 May
2015
4 May
'15
11:15 p.m.
On Mon, May 4, 2015 at 10:21 PM, Jerome Kieffer
Hi, If you want to play with 10 bits data-blocks, read 5 bytes and work with 4 entries at a time...
NumPy arrays don't have any support for sub-byte alignment. So if you want to handle such data, you either need to write some manual packing/unpacking code (using bitshift operators, or perhaps np.unpackbits, or whatever), or use another library designed for doing this. You may find Cython useful to write the core packing/unpacking, since bit-by-bit processing in a for loop is not something that CPython is super well suited to. Good luck, -n -- Nathaniel J. Smith -- http://vorpus.org