Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pywt/_thresholding.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ def threshold_firm(data, value_low, value_high):
"value_high must be greater than or equal to value_low.")

data = np.asarray(data)

if value_low == value_high:
return hard(data, value_low)

magnitude = np.absolute(data)
with np.errstate(divide='ignore', invalid='ignore'):
# divide by zero okay as np.inf values get clipped, so ignore warning.
Expand Down
Loading