pyo3
pyo3 copied to clipboard
Add conversion between fractions.Fraction and num-rational types
The int type in Python is unbounded. It would be nice to add int to BigInt and BigUInt conversion into PyO3. (from num-bigint)
And also, there is fractions.Fraction in Python, it would be nice to add the conversion to num-rational types.
https://github.com/rust-num
At least num-bigint is already supported (as is num-complex), as an optional feature: https://docs.rs/pyo3/latest/pyo3/#optional-feature-flags
num-rational could be implemented very similarly.
Changed the title to quickly indicate that this tracks adding support for num-rational on top of the existing num-bigint and num-complex support.
Added good first issue as this seems like a standalone new conversion and feature in src/conversions.
Given that there are other examples I can follow from src/conversions, this is one I would like to give a try as well :).