Skip to content

Commit 047b119

Browse files
committed
Use np.clip in QwtLogTransform.bounded for improved value bounding
1 parent fff8d4c commit 047b119

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qwt/transform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def bounded(self, value):
169169
:param float value: Value to be bounded
170170
:return: Value modified
171171
"""
172-
return max(self.LogMin, min(float(value), self.LogMax))
172+
return np.clip(float(value), self.LogMin, self.LogMax)
173173

174174
def transform(self, value):
175175
"""

0 commit comments

Comments
 (0)