-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 4372711 🚀
- Loading branch information
Showing
24 changed files
with
993 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: c71e12b7ec66c3a2f3ebe5890fdee542 | ||
config: 539dfd38076fa4795c26ec7134e64fc5 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
<!DOCTYPE html> | ||
|
||
<html lang="en" data-content_root="../../"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>dolomite_matrix.load_hdf5_sparse_matrix — dolomite-matrix 0.0.post1.dev1+g4372711 documentation</title> | ||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" /> | ||
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" /> | ||
<script src="../../_static/documentation_options.js?v=fdd660ca"></script> | ||
<script src="../../_static/doctools.js?v=888ff710"></script> | ||
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> | ||
<link rel="index" title="Index" href="../../genindex.html" /> | ||
<link rel="search" title="Search" href="../../search.html" /> | ||
|
||
<link rel="stylesheet" href="../../_static/custom.css" type="text/css" /> | ||
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" /> | ||
|
||
</head><body> | ||
|
||
|
||
<div class="document"> | ||
<div class="documentwrapper"> | ||
<div class="bodywrapper"> | ||
|
||
|
||
<div class="body" role="main"> | ||
|
||
<h1>Source code for dolomite_matrix.load_hdf5_sparse_matrix</h1><div class="highlight"><pre> | ||
<span></span><span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Any</span> | ||
<span class="kn">from</span> <span class="nn">numpy</span> <span class="kn">import</span> <span class="n">bool_</span> | ||
<span class="kn">from</span> <span class="nn">filebackedarray</span> <span class="kn">import</span> <span class="n">Hdf5CompressedSparseMatrix</span> | ||
<span class="kn">from</span> <span class="nn">dolomite_base</span> <span class="kn">import</span> <span class="n">acquire_file</span> | ||
|
||
|
||
<div class="viewcode-block" id="load_hdf5_sparse_matrix"> | ||
<a class="viewcode-back" href="../../api/dolomite_matrix.html#dolomite_matrix.load_hdf5_sparse_matrix.load_hdf5_sparse_matrix">[docs]</a> | ||
<span class="k">def</span> <span class="nf">load_hdf5_sparse_matrix</span><span class="p">(</span><span class="n">meta</span><span class="p">:</span> <span class="nb">dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">],</span> <span class="n">project</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span> <span class="o">-></span> <span class="n">Hdf5CompressedSparseMatrix</span><span class="p">:</span> | ||
<span class="w"> </span><span class="sd">"""</span> | ||
<span class="sd"> Load a HDF5-backed sparse matrix. In general, this function should be</span> | ||
<span class="sd"> called via :py:meth:`~dolomite_base.load_object.load_object`.</span> | ||
|
||
<span class="sd"> Args:</span> | ||
<span class="sd"> meta: Metadata for this HDF5 array.</span> | ||
|
||
<span class="sd"> project: Value specifying the project of interest. This is most</span> | ||
<span class="sd"> typically a string containing a file path to a staging directory</span> | ||
<span class="sd"> but may also be an application-specific object that works with</span> | ||
<span class="sd"> :py:meth:`~dolomite_base.acquire_file.acquire_file`.</span> | ||
|
||
<span class="sd"> kwargs: Further arguments, ignored.</span> | ||
|
||
<span class="sd"> Returns:</span> | ||
<span class="sd"> A HDF5-backed sparse matrix.</span> | ||
<span class="sd"> """</span> | ||
<span class="n">fpath</span> <span class="o">=</span> <span class="n">acquire_file</span><span class="p">(</span><span class="n">project</span><span class="p">,</span> <span class="n">meta</span><span class="p">[</span><span class="s2">"path"</span><span class="p">])</span> | ||
<span class="n">name</span> <span class="o">=</span> <span class="n">meta</span><span class="p">[</span><span class="s2">"hdf5_sparse_matrix"</span><span class="p">][</span><span class="s2">"group"</span><span class="p">]</span> | ||
|
||
<span class="n">dtype</span> <span class="o">=</span> <span class="kc">None</span> | ||
<span class="k">if</span> <span class="n">meta</span><span class="p">[</span><span class="s2">"array"</span><span class="p">][</span><span class="s2">"type"</span><span class="p">]</span> <span class="o">==</span> <span class="s2">"boolean"</span><span class="p">:</span> | ||
<span class="n">dtype</span> <span class="o">=</span> <span class="n">bool_</span> | ||
|
||
<span class="k">return</span> <span class="n">Hdf5CompressedSparseMatrix</span><span class="p">(</span><span class="n">fpath</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="o">*</span><span class="n">meta</span><span class="p">[</span><span class="s2">"array"</span><span class="p">][</span><span class="s2">"dimensions"</span><span class="p">],),</span> <span class="n">by_column</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="n">dtype</span><span class="p">)</span></div> | ||
|
||
</pre></div> | ||
|
||
</div> | ||
|
||
</div> | ||
</div> | ||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation"> | ||
<div class="sphinxsidebarwrapper"> | ||
<h1 class="logo"><a href="../../index.html">dolomite-matrix</a></h1> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3>Navigation</h3> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../../readme.html">Overview</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../contributing.html">Contributions & Help</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../license.html">License</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../authors.html">Authors</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../changelog.html">Changelog</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../api/modules.html">Module Reference</a></li> | ||
</ul> | ||
|
||
<div class="relations"> | ||
<h3>Related Topics</h3> | ||
<ul> | ||
<li><a href="../../index.html">Documentation overview</a><ul> | ||
<li><a href="../index.html">Module code</a><ul> | ||
</ul></li> | ||
</ul></li> | ||
</ul> | ||
</div> | ||
<div id="searchbox" style="display: none" role="search"> | ||
<h3 id="searchlabel">Quick search</h3> | ||
<div class="searchformwrapper"> | ||
<form class="search" action="../../search.html" method="get"> | ||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> | ||
<input type="submit" value="Go" /> | ||
</form> | ||
</div> | ||
</div> | ||
<script>document.getElementById('searchbox').style.display = "block"</script> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div> | ||
</div> | ||
<div class="clearer"></div> | ||
</div> | ||
<div class="footer"> | ||
©2023, LTLA. | ||
|
||
| | ||
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a> | ||
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a> | ||
|
||
</div> | ||
|
||
|
||
|
||
|
||
</body> | ||
</html> |
Oops, something went wrong.