Skip to content

Commit

Permalink
Deployed 596a264 with MkDocs version: 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldeistler committed Aug 20, 2024
1 parent 37333e8 commit e7a60a2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion faq/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@


<h1 id="frequently-asked-questions">Frequently asked questions<a class="headerlink" href="#frequently-asked-questions" title="Permanent link">&para;</a></h1>
<p><a href="question_01/">What makes <code>Jaxley</code> different from other libraries?</a></p>
<p><a href="question_01/">How can I save and load cells and networks?</a></p>



Expand Down
24 changes: 19 additions & 5 deletions faq/question_01/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@



<title>What makes jaxley different from other libraries? - Jaxley</title>
<title>How can I save and load cells and networks? - Jaxley</title>



Expand Down Expand Up @@ -70,7 +70,7 @@
<div data-md-component="skip">


<a href="#what-makes-jaxley-different-from-other-libraries" class="md-skip">
<a href="#how-can-i-save-and-load-cells-and-networks" class="md-skip">
Skip to content
</a>

Expand Down Expand Up @@ -105,7 +105,7 @@
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">

What makes jaxley different from other libraries?
How can I save and load cells and networks?

</span>
</div>
Expand Down Expand Up @@ -792,8 +792,22 @@



<h1 id="what-makes-jaxley-different-from-other-libraries">What makes <code>jaxley</code> different from other libraries?<a class="headerlink" href="#what-makes-jaxley-different-from-other-libraries" title="Permanent link">&para;</a></h1>
<p>Differentiable, jit-compilable, and implements implicit Euler for multicompartment models.</p>
<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>

<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>

<span class="c1"># Save.</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="s2">&quot;path/to/file.pkl&quot;</span><span class="p">,</span> <span class="s2">&quot;wb&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">handle</span><span class="p">:</span>
<span class="n">pickle</span><span class="o">.</span><span class="n">dump</span><span class="p">(</span><span class="n">network</span><span class="p">,</span> <span class="n">handle</span><span class="p">)</span>

<span class="c1"># Load.</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="s2">&quot;path/to/file.pkl&quot;</span><span class="p">,</span> <span class="s2">&quot;rb&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">handle</span><span class="p">:</span>
<span class="n">network</span> <span class="o">=</span> <span class="n">pickle</span><span class="o">.</span><span class="n">dump</span><span class="p">(</span><span class="n">handle</span><span class="p">)</span>
</code></pre></div></p>



Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit e7a60a2

Please sign in to comment.