Skip to content

Commit 50f85ae

Browse files
committed
Fix bounding logic in QwtLogTransform to ensure value is within defined limits
Fix #101
1 parent 3255ec4 commit 50f85ae

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Version 0.14.6
44

55
- Fixed [Issue #100](https://github.com/PlotPyStack/PythonQwt/issues/100) - TypeError in `QwtSymbol.drawSymbol` method due to outdated `renderSymbols` call
6+
- Fixed [Issue #101](https://github.com/PlotPyStack/PythonQwt/issues/101) - `RuntimeWarning: overflow encountered in cast` when plotting `numpy.float32` curve data
67

78
## Version 0.14.5
89

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 np.clip(value, self.LogMin, self.LogMax)
172+
return max(self.LogMin, min(value, self.LogMax))
173173

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

0 commit comments

Comments
 (0)