pyinterval icon indicating copy to clipboard operation
pyinterval copied to clipboard

Intervals for arbitrary comparable values

Open AlexandreDecan opened this issue 7 years ago • 2 comments

Hello,

First of all, thank you for pyinterval!

This post is not really an issue but could be considered as an "ads", sorry for that ;-) Some days ago, I was looking for a Python library providing interval arithmetic. A well-known search engine suggested pyinterval, but it seems that pyinterval is "restricted" to real numbers, and I was looking for a library that supports arbitrary objects (in short: I wanted to create and manipulate intervals of software versions).

Given I haven't found any maintained/stable/correct alternative, I decided to implement my own library that supports interval arithmetic for arbitrary comparable objects in Python. As I think I'm not the only one who found pyinterval by looking for a library that supports arbitrary objects, having a pointer to "alternative" libraries like mine could be interesting.

The library can be found at https://github.com/AlexandreDecan/python-intervals or on PyPI (package name is "python-intervals". Yeah, I known, that's not very imaginative ;-))

AlexandreDecan avatar Apr 12 '18 13:04 AlexandreDecan

Thanks for the link.

My library is pretty much focused on numerical computations with correct rounding, hence the restriction to floats.

There is plenty of space for other libraries that implement interval libraries on types that are not affected by rounding issues.

taschini avatar Apr 12 '18 14:04 taschini

Yes, but I was quite surprised to see that there was no library with similar quality than pyinterval but for arbitrary objects :)

AlexandreDecan avatar Apr 12 '18 14:04 AlexandreDecan