PyRoaring is a Python library providing an efficient and light-weight ordered set of integers. It serves as a Python wrapper for the highly optimized C library CRoaring, which implements Roaring Bitmaps. The library is actively maintained, with the current version being 1.0.4, and sees regular releases with new features and improvements.
pip install pyroaringVerified import paths — ran on the pinned version, not inferred.
This example demonstrates creating two Roaring BitMaps, adding elements, initializing from a list, performing intersection and union operations, and checking for element existence.
Upgrade to Python 3.9 or higher, or pin pyroaring to an earlier version (e.g., `<1.0.0` for Python 3.7, `<1.0.4` for Python 3.8).
Upgrade to PyRoaring 1.0.0 or later to ensure correct behavior for in-place self-operations. If upgrading is not possible, avoid such operations or create a copy before modifying.
If compiling from source, consult the PyRoaring release notes or `setup.py` for recommended Cython versions. For most users, installing pre-built wheels with `pip install pyroaring` avoids this issue.
Upgrade to PyRoaring 1.0.1 or later to benefit from safe deserialization, especially when handling data from external sources.
Always use `from pyroaring import BitMap64` when working with integers that may exceed the 32-bit unsigned integer range.
Install the package using pip: `pip install pyroaring`
Use 'RoaringBitmap' instead of 'BitMap'. For example: `from pyroaring import RoaringBitmap`
Ensure that only integer values are passed to pyroaring methods that expect integer elements.
Install the necessary build tools for your operating system (e.g., `sudo apt-get install build-essential python3-dev` on Debian/Ubuntu, `xcode-select --install` on macOS, or Visual C++ Build Tools on Windows).
No dependency data recorded yet.