Skip to content

Commit

Permalink
fix: shape mismatch in features.rms
Browse files Browse the repository at this point in the history
  • Loading branch information
Teagum committed Jun 25, 2024
1 parent fb39fea commit 7d07dc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/apollon/signal/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def rms(sig: FloatArray) -> FloatArray:
RMS of signal along first axis.
"""
buff = _np.empty_like(sig, dtype=_np.double)
out = _np.empty((sig.shape[1], 1), dtype=_np.double)
out = _np.empty((1, sig.shape[1]), dtype=_np.double)
_np.abs(sig, out=buff)
_np.square(buff, out=buff)
_np.mean(buff, axis=0, keepdims=True, out=out)
Expand Down

0 comments on commit 7d07dc8

Please sign in to comment.