Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qutil
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
qutech
qutil
Commits
d182fb36
Commit
d182fb36
authored
1 year ago
by
Tobias Hangleiter
Browse files
Options
Downloads
Patches
Plain Diff
Fix Bound for empty BoundedSet.max/min (nan)
parent
fc40b4eb
No related branches found
No related tags found
1 merge request
!102
Feature: domains
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
qutil/domains.py
+4
-2
4 additions, 2 deletions
qutil/domains.py
with
4 additions
and
2 deletions
qutil/domains.py
+
4
−
2
View file @
d182fb36
...
...
@@ -44,7 +44,8 @@ class Bound(Generic[_RealT]):
if
self
.
integral
:
try
:
return
self
.
cast_lower
(
lower
)
except
OverflowError
:
except
(
OverflowError
,
ValueError
):
# inf or nan
return
lower
return
lower
if
self
.
_name
.
startswith
(
'
_upper
'
):
...
...
@@ -52,7 +53,8 @@ class Bound(Generic[_RealT]):
if
self
.
integral
:
try
:
return
self
.
cast_upper
(
upper
)
except
OverflowError
:
except
(
OverflowError
,
ValueError
):
# inf or nan
return
upper
return
upper
raise
NameError
(
'
Bound descriptor instance name should start with lower or upper
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment