For the archive, I tried to use bitarray instead of bitstring and for
same file parsing went from 180ms to 60ms. Code was finally shorter and
more simple but less easy to jump into (documentation).
Performance is still far from using fromstring or fromfile which gives
like 5ms for similar size of
I have been very happy with the bitarray package. I don't know if it is
faster than bitstring, but it is worth a mention. Just watch out for any
hashing operations on its objects, it doesn't seem to do them right (set(),
dict(), etc...), but comparison operations work just fine.
Ben Root
_
Hi,
To answer Jerome (I hope), data is sometime spread on bytes shared by other
data in the whole record. 10 bits was an example, sometimes, 24, 2, 8, 7 etc.
all combined including some padding between them. I am not sure to have
understood...
To Nathaniel, yes indeed I could read the records i
On Mon, May 4, 2015 at 10:21 PM, Jerome Kieffer wrote:
> 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
pa
Hi,
If you want to play with 10 bits data-blocks, read 5 bytes and work with 4
entries at a time...
--
Jérôme Kieffer
Data analysis unit - ESRF
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-d
Hi,
I am developping a code to read binary files (MDF, Measurement Data File).
In its previous version 3, data was always byte aligned. I used widely
numpy.core.records module (fromstring, fromfile) showing good
performance to read and unpack data on the fly.
However, in the latest version 4, not