To access the machine representation of the object. Objects (except that bitarray are obviously homogeneous) is the ability wasSuccessful () UsageĪs mentioned above, bitarray objects behave very much like lists, so It will returnĪ object, such that one can verify thatĪll tests ran successfully by: import bitarray assert bitarray. Once you have installed the package, you may want to test it: $ python -c 'import bitarray bitarray.test()' bitarray is installed in: /Users/ilan/bitarray/bitarray Repository as well as conda-forge support bitarray): $ conda install bitarray In addition, conda packages are available (both the default Anaconda Which means you can simply: $ pip install bitarray Python wheels are are available on PyPI for all mayor platforms and Python Immutable frozenbitarray objects which are hashableĮxtensive test suite with over 400 unittests.Ĭonversion to and from hexadecimal strings Pickling and unpickling of bitarray objects. Packing and unpacking to other binary data formats, e.g. Operations +, *, +=, *=, the in operator, len()īitwise operations: ~, &, |, ^, > (as well asįast methods for encoding and decoding variable bit length prefix codes.īitarray objects support the buffer protocol (both importing and Sequence methods: slicing (including slice assignment and deletion), The bit endianness can be specified for each bitarray object, see below. Remove hackish support for bitarray() handling unpickling, Make little the default bit-endianness, as it will make unaligned In 2024 (probably around July), we are planning the release of bitarray 3.0. This allows creating bitarrays thatĪre mapped to other objects, including memory-mapped files. Methods for accessing the machine representation are provided, including theĪbility to import and export buffers. The user can select between two representations: little-endianĪnd big-endian. Eight bits are represented by one byte in a contiguous block of Bitarrays are sequence types and behave very much like usual This library provides an object type which efficiently represents an array
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |