From 07f63a88e3c8f52c401b7a67ab9363be29d29aa0 Mon Sep 17 00:00:00 2001 From: Ayush Agarwal Date: Sat, 24 Aug 2024 20:27:23 +0530 Subject: [PATCH] added changelog entry --- CITATION.cff | 3 +++ docs/whats_new.rst | 1 + pyprep/utils.py | 1 + 3 files changed, 5 insertions(+) diff --git a/CITATION.cff b/CITATION.cff index 1b6ee06..d17cba2 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -48,6 +48,9 @@ authors: - given-names: Nabil family-names: Alibou affiliation: 'Biotrial, Neuroscience Department, Rennes, France' + - given-names: Ayush + family-names: Agarwal + affiliation: 'Techno India University, India' type: software repository-code: 'https://github.com/sappelhoff/pyprep' license: MIT diff --git a/docs/whats_new.rst b/docs/whats_new.rst index e8ce05d..c386fb3 100644 --- a/docs/whats_new.rst +++ b/docs/whats_new.rst @@ -27,6 +27,7 @@ Version 0.5.0 (Unreleased) Changelog ~~~~~~~~~ - :meth:`~pyprep.NoisyChannels.find_bad_by_nan_flat` now accepts a ``flat_threshold`` argument, by `Nabil Alibou`_ (:gh:`144`) +- changed _mad function in utils.py to use median_abs_deviation from the sciPy module, by `Ayush Agarwal`_ (:gh:`153`). Bug ~~~ diff --git a/pyprep/utils.py b/pyprep/utils.py index b58db9f..c32f016 100644 --- a/pyprep/utils.py +++ b/pyprep/utils.py @@ -486,6 +486,7 @@ def _mad(x, axis=None): if x.ndim > 2: e = "Only 1D and 2D arrays are supported (input has {0} dimensions)" raise ValueError(e.format(x.ndim)) + # Calculate the median absolute deviation from the median mad = median_abs_deviation(x, axis=axis) return mad