From b464d07ab9580cd9c5c034f1d42160e88c356fa9 Mon Sep 17 00:00:00 2001 From: Moritz-Alexander-Kern Date: Wed, 30 Aug 2023 11:00:47 +0200 Subject: [PATCH] changed check if signal is subtype of float for inplace operations --- elephant/signal_processing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elephant/signal_processing.py b/elephant/signal_processing.py index 9a09f3fa8..1e8fe8631 100644 --- a/elephant/signal_processing.py +++ b/elephant/signal_processing.py @@ -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}")