Added hooke.util.yaml fixing YAML/NumPy type issues (by dropping data).
[hooke.git] / hooke / util / peak.py
index 185f04d760e2993a454996b28d45c422c78bfcfa..ef168910c6c3eb4ce542e0c7262cb9bd13aebdb0 100644 (file)
@@ -4,15 +4,15 @@
 #
 # This file is part of Hooke.
 #
-# Hooke is free software: you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation, either
-# version 3 of the License, or (at your option) any later version.
+# Hooke is free software: you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
 #
-# Hooke is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Lesser General Public License for more details.
+# Hooke is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
+# Public License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public
 # License along with Hooke.  If not, see
@@ -323,12 +323,12 @@ def above_noise(data, side='both', min_deviations=5.0, mean=None, std=None):
     --------
 
     >>> data = numpy.arange(-3, 4)
-    >>> above_noise(data, side='both', min_deviations=1.0, mean=0, std=1.0)
-    array([ True, False, False, False, False, False,  True], dtype=bool)
-    >>> above_noise(data, side='positive', min_deviations=1.0, mean=0, std=1.0)
-    array([False, False, False, False, False, False,  True], dtype=bool)
-    >>> above_noise(data, side='negative', min_deviations=1.0, mean=0, std=1.0)
-    array([ True, False, False, False, False, False, False], dtype=bool)
+    >>> above_noise(data, side='both', min_deviations=1.1, mean=0, std=1.0)
+    array([ True,  True, False, False, False,  True,  True], dtype=bool)
+    >>> above_noise(data, side='positive', min_deviations=1.1, mean=0, std=1.0)
+    array([False, False, False, False, False,  True,  True], dtype=bool)
+    >>> above_noise(data, side='negative', min_deviations=1.1, mean=0, std=1.0)
+    array([ True,  True, False, False, False, False, False], dtype=bool)
     """
     if mean == None:
         mean = data.mean()