Skip to content

Commit

Permalink
Deployed 6729b71 to dev with MkDocs 1.6.1 and mike 2.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 13, 2025
1 parent 2002bc0 commit eedcdde
Show file tree
Hide file tree
Showing 21 changed files with 527 additions and 527 deletions.
4 changes: 2 additions & 2 deletions dev/faq/question_02/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -798,8 +798,8 @@

<h1 id="how-can-i-save-and-load-cells-and-networks">How can I save and load cells and networks?<a class="headerlink" href="#how-can-i-save-and-load-cells-and-networks" title="Permanent link">&para;</a></h1>
<p>All <code>module</code>s (i.e., compartments, branches, cells, and networks) in <code>Jaxley</code> can be saved and loaded with pickle:
<div class="highlight"><pre><span></span><code><span class="kn">import</span> <span class="nn">jaxley</span> <span class="k">as</span> <span class="nn">jx</span>
<span class="kn">import</span> <span class="nn">pickle</span>
<div class="highlight"><pre><span></span><code><span class="kn">import</span><span class="w"> </span><span class="nn">jaxley</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">jx</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">pickle</span>

<span class="c1"># ... define network, cell, etc.</span>
<span class="n">network</span> <span class="o">=</span> <span class="n">jx</span><span class="o">.</span><span class="n">Network</span><span class="p">([</span><span class="n">cell1</span><span class="p">,</span> <span class="n">cell2</span><span class="p">])</span>
Expand Down
8 changes: 4 additions & 4 deletions dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -950,11 +950,11 @@ <h1>Home</h1>
</ul>
<h2 id="getting-started">Getting started<a class="headerlink" href="#getting-started" title="Permanent link">&para;</a></h2>
<p><code>Jaxley</code> allows to simulate biophysical neuron models on CPU, GPU, or TPU:
<div class="highlight"><pre><span></span><code><span class="kn">import</span> <span class="nn">matplotlib.pyplot</span> <span class="k">as</span> <span class="nn">plt</span>
<span class="kn">from</span> <span class="nn">jax</span> <span class="kn">import</span> <span class="n">config</span>
<div class="highlight"><pre><span></span><code><span class="kn">import</span><span class="w"> </span><span class="nn">matplotlib.pyplot</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">plt</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">jax</span><span class="w"> </span><span class="kn">import</span> <span class="n">config</span>

<span class="kn">import</span> <span class="nn">jaxley</span> <span class="k">as</span> <span class="nn">jx</span>
<span class="kn">from</span> <span class="nn">jaxley.channels</span> <span class="kn">import</span> <span class="n">HH</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">jaxley</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">jx</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">jaxley.channels</span><span class="w"> </span><span class="kn">import</span> <span class="n">HH</span>

<span class="n">config</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="s2">&quot;jax_platform_name&quot;</span><span class="p">,</span> <span class="s2">&quot;cpu&quot;</span><span class="p">)</span> <span class="c1"># Or &quot;gpu&quot; / &quot;tpu&quot;.</span>

Expand Down
12 changes: 6 additions & 6 deletions dev/reference/connect/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ <h3 id="jaxley.connect.connect" class="doc doc-heading">
<span class="normal">37</span>
<span class="normal">38</span>
<span class="normal">39</span>
<span class="normal">40</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span> <span class="nf">connect</span><span class="p">(</span>
<span class="normal">40</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span><span class="w"> </span><span class="nf">connect</span><span class="p">(</span>
<span class="n">pre</span><span class="p">:</span> <span class="s2">&quot;View&quot;</span><span class="p">,</span>
<span class="n">post</span><span class="p">:</span> <span class="s2">&quot;View&quot;</span><span class="p">,</span>
<span class="n">synapse_type</span><span class="p">:</span> <span class="s2">&quot;Synapse&quot;</span><span class="p">,</span>
Expand Down Expand Up @@ -1268,7 +1268,7 @@ <h3 id="jaxley.connect.connectivity_matrix_connect" class="doc doc-heading">
<span class="normal">174</span>
<span class="normal">175</span>
<span class="normal">176</span>
<span class="normal">177</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span> <span class="nf">connectivity_matrix_connect</span><span class="p">(</span>
<span class="normal">177</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span><span class="w"> </span><span class="nf">connectivity_matrix_connect</span><span class="p">(</span>
<span class="n">pre_cell_view</span><span class="p">:</span> <span class="s2">&quot;View&quot;</span><span class="p">,</span>
<span class="n">post_cell_view</span><span class="p">:</span> <span class="s2">&quot;View&quot;</span><span class="p">,</span>
<span class="n">synapse_type</span><span class="p">:</span> <span class="s2">&quot;Synapse&quot;</span><span class="p">,</span>
Expand Down Expand Up @@ -1436,7 +1436,7 @@ <h3 id="jaxley.connect.fully_connect" class="doc doc-heading">
<span class="normal">72</span>
<span class="normal">73</span>
<span class="normal">74</span>
<span class="normal">75</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span> <span class="nf">fully_connect</span><span class="p">(</span>
<span class="normal">75</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span><span class="w"> </span><span class="nf">fully_connect</span><span class="p">(</span>
<span class="n">pre_cell_view</span><span class="p">:</span> <span class="s2">&quot;View&quot;</span><span class="p">,</span>
<span class="n">post_cell_view</span><span class="p">:</span> <span class="s2">&quot;View&quot;</span><span class="p">,</span>
<span class="n">synapse_type</span><span class="p">:</span> <span class="s2">&quot;Synapse&quot;</span><span class="p">,</span>
Expand Down Expand Up @@ -1494,7 +1494,7 @@ <h3 id="jaxley.connect.is_same_network" class="doc doc-heading">
<span class="normal"> 8</span>
<span class="normal"> 9</span>
<span class="normal">10</span>
<span class="normal">11</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span> <span class="nf">is_same_network</span><span class="p">(</span><span class="n">pre</span><span class="p">:</span> <span class="s2">&quot;View&quot;</span><span class="p">,</span> <span class="n">post</span><span class="p">:</span> <span class="s2">&quot;View&quot;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<span class="normal">11</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span><span class="w"> </span><span class="nf">is_same_network</span><span class="p">(</span><span class="n">pre</span><span class="p">:</span> <span class="s2">&quot;View&quot;</span><span class="p">,</span> <span class="n">post</span><span class="p">:</span> <span class="s2">&quot;View&quot;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Check if views are from the same network.&quot;&quot;&quot;</span>
<span class="n">is_in_net</span> <span class="o">=</span> <span class="s2">&quot;network&quot;</span> <span class="ow">in</span> <span class="n">pre</span><span class="o">.</span><span class="n">base</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span>
<span class="n">is_in_same_net</span> <span class="o">=</span> <span class="n">pre</span><span class="o">.</span><span class="n">base</span> <span class="ow">is</span> <span class="n">post</span><span class="o">.</span><span class="n">base</span>
Expand Down Expand Up @@ -1525,7 +1525,7 @@ <h3 id="jaxley.connect.sample_comp" class="doc doc-heading">
<span class="normal">15</span>
<span class="normal">16</span>
<span class="normal">17</span>
<span class="normal">18</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span> <span class="nf">sample_comp</span><span class="p">(</span><span class="n">cell_view</span><span class="p">:</span> <span class="s2">&quot;View&quot;</span><span class="p">,</span> <span class="n">num</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="s2">&quot;CompartmentView&quot;</span><span class="p">:</span>
<span class="normal">18</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span><span class="w"> </span><span class="nf">sample_comp</span><span class="p">(</span><span class="n">cell_view</span><span class="p">:</span> <span class="s2">&quot;View&quot;</span><span class="p">,</span> <span class="n">num</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="s2">&quot;CompartmentView&quot;</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Sample a compartment from a cell.</span>

<span class="sd"> Returns View with shape (num, num_cols).&quot;&quot;&quot;</span>
Expand Down Expand Up @@ -1677,7 +1677,7 @@ <h3 id="jaxley.connect.sparse_connect" class="doc doc-heading">
<span class="normal">121</span>
<span class="normal">122</span>
<span class="normal">123</span>
<span class="normal">124</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span> <span class="nf">sparse_connect</span><span class="p">(</span>
<span class="normal">124</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span><span class="w"> </span><span class="nf">sparse_connect</span><span class="p">(</span>
<span class="n">pre_cell_view</span><span class="p">:</span> <span class="s2">&quot;View&quot;</span><span class="p">,</span>
<span class="n">post_cell_view</span><span class="p">:</span> <span class="s2">&quot;View&quot;</span><span class="p">,</span>
<span class="n">synapse_type</span><span class="p">:</span> <span class="s2">&quot;Synapse&quot;</span><span class="p">,</span>
Expand Down
Loading

0 comments on commit eedcdde

Please sign in to comment.