Skip to content

Commit

Permalink
added better doc string.
Browse files Browse the repository at this point in the history
  • Loading branch information
millen1m committed Aug 10, 2018
1 parent 8c3d2e9 commit 641739f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion eqsig/__about__.py
@@ -1 +1 @@
__version__ = "0.5.22"
__version__ = "0.5.23"
15 changes: 15 additions & 0 deletions eqsig/functions.py
Expand Up @@ -46,6 +46,21 @@ def clean_out_non_changing(values):


def determine_delta_peak_only_series(values):
"""
Creates an array with only the changes in the peak values and zeros for non-peak values.
Parameters
----------
:param values: array_like, array of values
:return:
Examples
--------
>>> values = np.array([0, 2, 1, 2, 0, 1, 0, -1, 0, 1, 0])
np.array([0, 2, 1, 2, 0.3, 1, 0.3, -1, 0.4, 1, 0])
>>> determine_delta_peak_only_series(values)
array([0, 2, -1, 2, 0, 1, 0, 1, 0, 1, 0])
"""
# enforce array type
values = np.array(values)
# rebase to zero as first value
Expand Down

0 comments on commit 641739f

Please sign in to comment.