A high-performance Cython + GMP, very basic and custom implementation of Python’s built-in fractions library.
It is ~1.5× to 4× faster than the standard Python implementation and was made to be used internally by
td2inner.
⚠️ This package must be compiled locally.
No prebuilt wheels are provided.
fractionalstd2inner contains a native Cython extension that depends on
GMP (GNU Multiple Precision Arithmetic Library).
Because of this:
- ❌ No prebuilt wheels
- ✅ Development tools are required
- ✅ Compilation occurs during
pip install
This is intentional.
- Python ≥ 3.10
- C / C++ compiler
- Cython ≥ 3.2
- GMP development headers
sudo pacman -S gmp base-devel cythonsudo apt update
sudo apt install -y libgmp-dev build-essential python3-dev cython3sudo dnf install -y gcc gcc-c++ make automake gmp-devel python3-devel cythonsudo yum groupinstall "Development Tools" -y
sudo yum install -y gmp-devel python3-devel cythonsudo zypper install -y gcc gcc-c++ make gmp-devel python3-devel cythonpacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-gmp mingw-w64-x86_64-python3-cythonxcode-select --install
brew install gmp cython pythonpython3 -m pip install fractionalstd2innerpython3 -c "import fractionalstd2inner; print(fractionalstd2inner.__version__)"