Skip to content

Commit

Permalink
changed check if signal is subtype of float for inplace operations
Browse files Browse the repository at this point in the history
  • Loading branch information
Moritz-Alexander-Kern committed Aug 30, 2023
1 parent 2bd871a commit b464d07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elephant/signal_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def zscore(signal, inplace=True):
for sig in signal:
# Perform inplace operation only if array is of dtype float.
# Otherwise, raise an error.
if inplace and not np.issubdtype(float, sig.dtype):
if inplace and not np.issubdtype(sig.dtype, np.floating):
raise ValueError(f"Cannot perform inplace operation as the "
f"signal dtype is not float. Source: {sig.name}")

Expand Down

0 comments on commit b464d07

Please sign in to comment.