-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[enhancement] Add function is_singleton #8
Comments
Hello, That's feasible ;) I've two questions in mind then:
|
I'm currently considering making >>> x = I.openclosed(-I.inf, 0)
>>> # Check for left/right closed
>>> x.left == I.CLOSED, x.right == I.CLOSED
(False, True)
>>> # Check if interval is left/right bounded
>>> x.lower == -I.inf, x.upper == I.inf
(True, False)
>>> # Check for singleton
>>> x.lower == x.upper
False |
Does the change solve your problem? It allows you to do I know that you found |
I merged the changes to master, among other (many) changes that should ease intervals transformations and modifications. I'll release 1.8.0 tomorrow unless these changes do not solve this issue. |
Hello,
I was wondering if it will be possible to add a function that could say if an interval is a singleton or not ?
For the moment I just did i.lower==i.upper but I found it dirty. A solution with a function is_singleton will be more elegant.
Thank you in advance
The text was updated successfully, but these errors were encountered: