Skip to content

Commit

Permalink
add load example
Browse files Browse the repository at this point in the history
  • Loading branch information
SheinaG committed May 3, 2023
1 parent 0b43736 commit d007255
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Binary file modified docs/build/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/.doctrees/pecg.doctree
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/build/_modules/pecg/Example.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ <h1>Source code for pecg.Example</h1><div class="highlight"><pre>
<span class="kn">import</span> <span class="nn">wfdb</span>


<div class="viewcode-block" id="load_example"><a class="viewcode-back" href="../../pecg.html#pecg.Example.load_example">[docs]</a><span class="k">def</span> <span class="nf">load_example</span><span class="p">(</span><span class="n">ecg_type</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">,</span> <span class="nb">int</span><span class="p">):</span>
<div class="viewcode-block" id="load_example"><a class="viewcode-back" href="../../pecg.html#pecg.Example.load_example">[docs]</a><span class="k">def</span> <span class="nf">load_example</span><span class="p">(</span><span class="n">ecg_type</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="nb">int</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> The load_example function loads an ECG signal from the PhysioNet open source datasets. There are three types of ECG</span>
<span class="sd"> that might be downloded: longe single lead ECG, &#39;12-lead&#39; and a Holter with two channels.</span>
<span class="sd"> </span>

<span class="sd"> :param ecg_type: The type of the signal that you would like download: &#39;single-lead&#39;, &#39;12-lead&#39; and &#39;Holter&#39;.</span>
<span class="sd"> :return:</span>
<span class="sd"> * signal: the ECG signal as a ndarray, with shape (L, N) when L is the number of channels or leads and N is the number of samples.</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/build/pecg.html
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ <h1>pecg package<a class="headerlink" href="#pecg-package" title="Permalink to t
<span id="pecg-example"></span><h2>pecg.Example<a class="headerlink" href="#module-pecg.Example" title="Permalink to this heading"></a></h2>
<dl class="py function">
<dt class="sig sig-object py" id="pecg.Example.load_example">
<span class="sig-prename descclassname"><span class="pre">pecg.Example.</span></span><span class="sig-name descname"><span class="pre">load_example</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ecg_type:</span> <span class="pre">str</span> <span class="pre">=</span> <span class="pre">'')</span> <span class="pre">-&gt;</span> <span class="pre">(&lt;built-in</span> <span class="pre">function</span> <span class="pre">array&gt;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">&lt;class</span> <span class="pre">'int'&gt;</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pecg/Example.html#load_example"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pecg.Example.load_example" title="Permalink to this definition"></a></dt>
<span class="sig-prename descclassname"><span class="pre">pecg.Example.</span></span><span class="sig-name descname"><span class="pre">load_example</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ecg_type:</span> <span class="pre">str)</span> <span class="pre">-&gt;</span> <span class="pre">(&lt;class</span> <span class="pre">'numpy.ndarray'&gt;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">&lt;class</span> <span class="pre">'int'&gt;</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pecg/Example.html#load_example"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pecg.Example.load_example" title="Permalink to this definition"></a></dt>
<dd><p>The load_example function loads an ECG signal from the PhysioNet open source datasets. There are three types of ECG
that might be downloded: longe single lead ECG, ‘12-lead’ and a Holter with two channels.</p>
<dl class="field-list simple">
Expand Down
2 changes: 1 addition & 1 deletion docs/build/searchindex.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pecg/Example.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import wfdb


def load_example(ecg_type: str = '') -> (np.array, int):
def load_example(ecg_type: str) -> (np.ndarray, int):
"""
The load_example function loads an ECG signal from the PhysioNet open source datasets. There are three types of ECG
that might be downloded: longe single lead ECG, '12-lead' and a Holter with two channels.
:param ecg_type: The type of the signal that you would like download: 'single-lead', '12-lead' and 'Holter'.
:return:
* signal: the ECG signal as a ndarray, with shape (L, N) when L is the number of channels or leads and N is the number of samples.
Expand Down

0 comments on commit d007255

Please sign in to comment.