Skip to content

Commit

Permalink
Deploy 2a96510
Browse files Browse the repository at this point in the history
  • Loading branch information
mhostetter authored and github-actions[bot] committed Sep 5, 2024
1 parent 6ed4466 commit 29f6280
Show file tree
Hide file tree
Showing 78 changed files with 404 additions and 366 deletions.
Binary file modified v0.4.x/.doctrees/api/galois.BCH.decode.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.BCH.detect.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.BCH.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.BCH.encode.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.FieldArray.Random.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.FieldArray.characteristic_poly.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.FieldArray.column_space.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.FieldArray.left_null_space.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.FieldArray.log.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.FieldArray.minimal_poly.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.FieldArray.null_space.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.FieldArray.row_space.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.Poly.Random.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.Poly.derivative.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.Poly.field.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.Poly.is_irreducible.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.ReedSolomon.decode.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.ReedSolomon.detect.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.ReedSolomon.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.ReedSolomon.encode.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.crt.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.fermat_primality_test.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.irreducible_poly.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.irreducible_polys.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.lagrange_poly.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.primitive_element.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.primitive_poly.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.primitive_polys.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.primitive_root.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.primitive_roots.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.prod.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/api/galois.typing.ShapeLike.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/basic-usage/array-creation.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/basic-usage/element-representation.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/basic-usage/poly.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/environment.pickle
Binary file not shown.
Binary file modified v0.4.x/.doctrees/getting-started.doctree
Binary file not shown.
Binary file modified v0.4.x/.doctrees/release-notes/v0.4.doctree
Binary file not shown.
12 changes: 12 additions & 0 deletions v0.4.x/_sources/release-notes/v0.4.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,15 @@ tocdepth: 2
- Semjon Kravtšenko ([@semjon00](https://github.com/semjon00))
- [@MrVeka](https://github.com/MrVeka)
- Matt Hostetter ([@mhostetter](https://github.com/mhostetter))

## v0.4.2

*Released September 5, 2024*

### Changes

- Added support for NumPy 2.1. ([#567](https://github.com/mhostetter/galois/issues/567))

### Contributors

- Matt Hostetter ([@mhostetter](https://github.com/mhostetter))
80 changes: 40 additions & 40 deletions v0.4.x/api/galois.BCH.decode/index.html

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions v0.4.x/api/galois.BCH.detect/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7843,10 +7843,10 @@
<span class="gp">In [2]: </span><span class="n">GF</span> <span class="o">=</span> <span class="n">bch</span><span class="o">.</span><span class="n">field</span>

<span class="gp">In [3]: </span><span class="n">m</span> <span class="o">=</span> <span class="n">GF</span><span class="o">.</span><span class="n">Random</span><span class="p">(</span><span class="n">bch</span><span class="o">.</span><span class="n">k</span><span class="p">);</span> <span class="n">m</span>
<span class="gh">Out[3]: </span><span class="go">GF([0, 0, 1, 0, 1, 1, 0], order=2)</span>
<span class="gh">Out[3]: </span><span class="go">GF([0, 1, 1, 0, 0, 0, 0], order=2)</span>

<span class="gp">In [4]: </span><span class="n">c</span> <span class="o">=</span> <span class="n">bch</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="n">m</span><span class="p">);</span> <span class="n">c</span>
<span class="gh">Out[4]: </span><span class="go">GF([0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1], order=2)</span>
<span class="gh">Out[4]: </span><span class="go">GF([0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0], order=2)</span>
</code></pre></div>
</div>
<p>Detect no errors in the valid codeword.</p>
Expand All @@ -7859,7 +7859,7 @@
<span class="gh">Out[6]: </span><span class="go">5</span>

<span class="gp">In [7]: </span><span class="n">c</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="n">bch</span><span class="o">.</span><span class="n">d</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> <span class="o">^=</span> <span class="mi">1</span><span class="p">;</span> <span class="n">c</span>
<span class="gh">Out[7]: </span><span class="go">GF([1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1], order=2)</span>
<span class="gh">Out[7]: </span><span class="go">GF([1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0], order=2)</span>

<span class="gp">In [8]: </span><span class="n">bch</span><span class="o">.</span><span class="n">detect</span><span class="p">(</span><span class="n">c</span><span class="p">)</span>
<span class="gh">Out[8]: </span><span class="go">True</span>
Expand All @@ -7873,10 +7873,10 @@
<span class="gp">In [10]: </span><span class="n">GF</span> <span class="o">=</span> <span class="n">bch</span><span class="o">.</span><span class="n">field</span>

<span class="gp">In [11]: </span><span class="n">m</span> <span class="o">=</span> <span class="n">GF</span><span class="o">.</span><span class="n">Random</span><span class="p">(</span><span class="n">bch</span><span class="o">.</span><span class="n">k</span> <span class="o">-</span> <span class="mi">3</span><span class="p">);</span> <span class="n">m</span>
<span class="gh">Out[11]: </span><span class="go">GF([1, 1, 0, 1], order=2)</span>
<span class="gh">Out[11]: </span><span class="go">GF([1, 0, 0, 1], order=2)</span>

<span class="gp">In [12]: </span><span class="n">c</span> <span class="o">=</span> <span class="n">bch</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="n">m</span><span class="p">);</span> <span class="n">c</span>
<span class="gh">Out[12]: </span><span class="go">GF([1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0], order=2)</span>
<span class="gh">Out[12]: </span><span class="go">GF([1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0], order=2)</span>
</code></pre></div>
</div>
<p>Detect no errors in the valid codeword.</p>
Expand All @@ -7889,7 +7889,7 @@
<span class="gh">Out[14]: </span><span class="go">5</span>

<span class="gp">In [15]: </span><span class="n">c</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="n">bch</span><span class="o">.</span><span class="n">d</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> <span class="o">^=</span> <span class="mi">1</span><span class="p">;</span> <span class="n">c</span>
<span class="gh">Out[15]: </span><span class="go">GF([0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0], order=2)</span>
<span class="gh">Out[15]: </span><span class="go">GF([0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0], order=2)</span>

<span class="gp">In [16]: </span><span class="n">bch</span><span class="o">.</span><span class="n">detect</span><span class="p">(</span><span class="n">c</span><span class="p">)</span>
<span class="gh">Out[16]: </span><span class="go">True</span>
Expand All @@ -7904,15 +7904,15 @@

<span class="gp">In [19]: </span><span class="n">m</span> <span class="o">=</span> <span class="n">GF</span><span class="o">.</span><span class="n">Random</span><span class="p">((</span><span class="mi">3</span><span class="p">,</span> <span class="n">bch</span><span class="o">.</span><span class="n">k</span><span class="p">));</span> <span class="n">m</span>
<span class="gh">Out[19]: </span>
<span class="go">GF([[1, 0, 1, 0, 1, 1, 1],</span>
<span class="go"> [0, 1, 1, 0, 0, 1, 0],</span>
<span class="go"> [0, 0, 0, 0, 0, 1, 1]], order=2)</span>
<span class="go">GF([[1, 0, 1, 0, 1, 1, 0],</span>
<span class="go"> [1, 0, 1, 1, 1, 0, 0],</span>
<span class="go"> [1, 1, 1, 1, 1, 0, 1]], order=2)</span>

<span class="gp">In [20]: </span><span class="n">c</span> <span class="o">=</span> <span class="n">bch</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="n">m</span><span class="p">);</span> <span class="n">c</span>
<span class="gh">Out[20]: </span>
<span class="go">GF([[1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0],</span>
<span class="go"> [0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1],</span>
<span class="go"> [0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0]], order=2)</span>
<span class="go">GF([[1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1],</span>
<span class="go"> [1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1],</span>
<span class="go"> [1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0]], order=2)</span>
</code></pre></div>
</div>
<p>Detect no errors in the valid codewords.</p>
Expand All @@ -7932,9 +7932,9 @@

<span class="gp">In [26]: </span><span class="n">c</span>
<span class="gh">Out[26]: </span>
<span class="go">GF([[0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0],</span>
<span class="go"> [1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1],</span>
<span class="go"> [1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0]], order=2)</span>
<span class="go">GF([[0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1],</span>
<span class="go"> [0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1],</span>
<span class="go"> [0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0]], order=2)</span>

<span class="gp">In [27]: </span><span class="n">bch</span><span class="o">.</span><span class="n">detect</span><span class="p">(</span><span class="n">c</span><span class="p">)</span>
<span class="gh">Out[27]: </span><span class="go">array([ True, True, True])</span>
Expand All @@ -7949,15 +7949,15 @@

<span class="gp">In [30]: </span><span class="n">m</span> <span class="o">=</span> <span class="n">GF</span><span class="o">.</span><span class="n">Random</span><span class="p">((</span><span class="mi">3</span><span class="p">,</span> <span class="n">bch</span><span class="o">.</span><span class="n">k</span> <span class="o">-</span> <span class="mi">3</span><span class="p">));</span> <span class="n">m</span>
<span class="gh">Out[30]: </span>
<span class="go">GF([[1, 1, 0, 1],</span>
<span class="go"> [0, 1, 1, 0],</span>
<span class="go"> [1, 1, 1, 1]], order=2)</span>
<span class="go">GF([[1, 0, 1, 0],</span>
<span class="go"> [1, 0, 1, 0],</span>
<span class="go"> [1, 0, 0, 0]], order=2)</span>

<span class="gp">In [31]: </span><span class="n">c</span> <span class="o">=</span> <span class="n">bch</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="n">m</span><span class="p">);</span> <span class="n">c</span>
<span class="gh">Out[31]: </span>
<span class="go">GF([[1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0],</span>
<span class="go"> [0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1],</span>
<span class="go"> [1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1]], order=2)</span>
<span class="go">GF([[1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0],</span>
<span class="go"> [1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0],</span>
<span class="go"> [1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1]], order=2)</span>
</code></pre></div>
</div>
<p>Detect no errors in the valid codewords.</p>
Expand All @@ -7977,9 +7977,9 @@

<span class="gp">In [37]: </span><span class="n">c</span>
<span class="gh">Out[37]: </span>
<span class="go">GF([[0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0],</span>
<span class="go"> [1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1],</span>
<span class="go"> [0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1]], order=2)</span>
<span class="go">GF([[0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0],</span>
<span class="go"> [0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0],</span>
<span class="go"> [0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1]], order=2)</span>

<span class="gp">In [38]: </span><span class="n">bch</span><span class="o">.</span><span class="n">detect</span><span class="p">(</span><span class="n">c</span><span class="p">)</span>
<span class="gh">Out[38]: </span><span class="go">array([ True, True, True])</span>
Expand Down
48 changes: 24 additions & 24 deletions v0.4.x/api/galois.BCH.encode/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7900,15 +7900,15 @@
<span class="gp">In [2]: </span><span class="n">GF</span> <span class="o">=</span> <span class="n">bch</span><span class="o">.</span><span class="n">field</span>

<span class="gp">In [3]: </span><span class="n">m</span> <span class="o">=</span> <span class="n">GF</span><span class="o">.</span><span class="n">Random</span><span class="p">(</span><span class="n">bch</span><span class="o">.</span><span class="n">k</span><span class="p">);</span> <span class="n">m</span>
<span class="gh">Out[3]: </span><span class="go">GF([0, 1, 0, 0, 0, 1, 0], order=2)</span>
<span class="gh">Out[3]: </span><span class="go">GF([1, 0, 1, 0, 0, 0, 0], order=2)</span>

<span class="gp">In [4]: </span><span class="n">c</span> <span class="o">=</span> <span class="n">bch</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="n">m</span><span class="p">);</span> <span class="n">c</span>
<span class="gh">Out[4]: </span><span class="go">GF([0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1], order=2)</span>
<span class="gh">Out[4]: </span><span class="go">GF([1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0], order=2)</span>
</code></pre></div>
</div>
<p>Compute the parity symbols only.</p>
<div class="highlight-ipython notranslate"><div class="highlight"><pre><span></span><code><span class="gp">In [5]: </span><span class="n">p</span> <span class="o">=</span> <span class="n">bch</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="n">m</span><span class="p">,</span> <span class="n">output</span><span class="o">=</span><span class="s2">&quot;parity&quot;</span><span class="p">);</span> <span class="n">p</span>
<span class="gh">Out[5]: </span><span class="go">GF([0, 0, 0, 0, 0, 1, 1, 1], order=2)</span>
<span class="gh">Out[5]: </span><span class="go">GF([1, 1, 0, 1, 0, 0, 1, 0], order=2)</span>
</code></pre></div>
</div>
</div>
Expand All @@ -7919,15 +7919,15 @@
<span class="gp">In [7]: </span><span class="n">GF</span> <span class="o">=</span> <span class="n">bch</span><span class="o">.</span><span class="n">field</span>

<span class="gp">In [8]: </span><span class="n">m</span> <span class="o">=</span> <span class="n">GF</span><span class="o">.</span><span class="n">Random</span><span class="p">(</span><span class="n">bch</span><span class="o">.</span><span class="n">k</span> <span class="o">-</span> <span class="mi">3</span><span class="p">);</span> <span class="n">m</span>
<span class="gh">Out[8]: </span><span class="go">GF([1, 0, 1, 1], order=2)</span>
<span class="gh">Out[8]: </span><span class="go">GF([0, 1, 0, 0], order=2)</span>

<span class="gp">In [9]: </span><span class="n">c</span> <span class="o">=</span> <span class="n">bch</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="n">m</span><span class="p">);</span> <span class="n">c</span>
<span class="gh">Out[9]: </span><span class="go">GF([1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1], order=2)</span>
<span class="gh">Out[9]: </span><span class="go">GF([0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0], order=2)</span>
</code></pre></div>
</div>
<p>Compute the parity symbols only.</p>
<div class="highlight-ipython notranslate"><div class="highlight"><pre><span></span><code><span class="gp">In [10]: </span><span class="n">p</span> <span class="o">=</span> <span class="n">bch</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="n">m</span><span class="p">,</span> <span class="n">output</span><span class="o">=</span><span class="s2">&quot;parity&quot;</span><span class="p">);</span> <span class="n">p</span>
<span class="gh">Out[10]: </span><span class="go">GF([1, 0, 1, 1, 1, 1, 1, 1], order=2)</span>
<span class="gh">Out[10]: </span><span class="go">GF([1, 1, 1, 0, 0, 1, 1, 0], order=2)</span>
</code></pre></div>
</div>
</div>
Expand All @@ -7939,23 +7939,23 @@

<span class="gp">In [13]: </span><span class="n">m</span> <span class="o">=</span> <span class="n">GF</span><span class="o">.</span><span class="n">Random</span><span class="p">((</span><span class="mi">3</span><span class="p">,</span> <span class="n">bch</span><span class="o">.</span><span class="n">k</span><span class="p">));</span> <span class="n">m</span>
<span class="gh">Out[13]: </span>
<span class="go">GF([[0, 1, 0, 1, 0, 0, 0],</span>
<span class="go"> [1, 1, 1, 0, 0, 0, 0],</span>
<span class="go"> [1, 0, 0, 0, 0, 0, 0]], order=2)</span>
<span class="go">GF([[1, 1, 1, 0, 0, 0, 1],</span>
<span class="go"> [0, 1, 0, 0, 1, 1, 1],</span>
<span class="go"> [0, 0, 1, 1, 0, 0, 0]], order=2)</span>

<span class="gp">In [14]: </span><span class="n">c</span> <span class="o">=</span> <span class="n">bch</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="n">m</span><span class="p">);</span> <span class="n">c</span>
<span class="gh">Out[14]: </span>
<span class="go">GF([[0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1],</span>
<span class="go"> [1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0],</span>
<span class="go"> [1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0]], order=2)</span>
<span class="go">GF([[1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1],</span>
<span class="go"> [0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0],</span>
<span class="go"> [0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1]], order=2)</span>
</code></pre></div>
</div>
<p>Compute the parity symbols only.</p>
<div class="highlight-ipython notranslate"><div class="highlight"><pre><span></span><code><span class="gp">In [15]: </span><span class="n">p</span> <span class="o">=</span> <span class="n">bch</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="n">m</span><span class="p">,</span> <span class="n">output</span><span class="o">=</span><span class="s2">&quot;parity&quot;</span><span class="p">);</span> <span class="n">p</span>
<span class="gh">Out[15]: </span>
<span class="go">GF([[0, 1, 1, 0, 1, 0, 0, 1],</span>
<span class="go"> [1, 0, 1, 0, 0, 1, 1, 0],</span>
<span class="go"> [1, 1, 1, 0, 1, 0, 0, 0]], order=2)</span>
<span class="go">GF([[0, 1, 1, 1, 0, 1, 1, 1],</span>
<span class="go"> [0, 0, 1, 1, 0, 0, 0, 0],</span>
<span class="go"> [0, 0, 1, 0, 0, 1, 1, 1]], order=2)</span>
</code></pre></div>
</div>
</div>
Expand All @@ -7967,23 +7967,23 @@

<span class="gp">In [18]: </span><span class="n">m</span> <span class="o">=</span> <span class="n">GF</span><span class="o">.</span><span class="n">Random</span><span class="p">((</span><span class="mi">3</span><span class="p">,</span> <span class="n">bch</span><span class="o">.</span><span class="n">k</span> <span class="o">-</span> <span class="mi">3</span><span class="p">));</span> <span class="n">m</span>
<span class="gh">Out[18]: </span>
<span class="go">GF([[1, 0, 1, 0],</span>
<span class="go"> [1, 0, 1, 1],</span>
<span class="go"> [1, 1, 0, 1]], order=2)</span>
<span class="go">GF([[1, 1, 0, 0],</span>
<span class="go"> [1, 0, 0, 1],</span>
<span class="go"> [0, 0, 1, 0]], order=2)</span>

<span class="gp">In [19]: </span><span class="n">c</span> <span class="o">=</span> <span class="n">bch</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="n">m</span><span class="p">);</span> <span class="n">c</span>
<span class="gh">Out[19]: </span>
<span class="go">GF([[1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0],</span>
<span class="go"> [1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1],</span>
<span class="go"> [1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0]], order=2)</span>
<span class="go">GF([[1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1],</span>
<span class="go"> [1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0],</span>
<span class="go"> [0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1]], order=2)</span>
</code></pre></div>
</div>
<p>Compute the parity symbols only.</p>
<div class="highlight-ipython notranslate"><div class="highlight"><pre><span></span><code><span class="gp">In [20]: </span><span class="n">p</span> <span class="o">=</span> <span class="n">bch</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="n">m</span><span class="p">,</span> <span class="n">output</span><span class="o">=</span><span class="s2">&quot;parity&quot;</span><span class="p">);</span> <span class="n">p</span>
<span class="gh">Out[20]: </span>
<span class="go">GF([[0, 1, 1, 0, 1, 1, 1, 0],</span>
<span class="go"> [1, 0, 1, 1, 1, 1, 1, 1],</span>
<span class="go"> [0, 0, 1, 0, 1, 0, 1, 0]], order=2)</span>
<span class="go">GF([[1, 1, 1, 1, 1, 0, 1, 1],</span>
<span class="go"> [1, 1, 0, 0, 1, 1, 0, 0],</span>
<span class="go"> [0, 1, 1, 1, 0, 0, 1, 1]], order=2)</span>
</code></pre></div>
</div>
</div>
Expand Down
Loading

0 comments on commit 29f6280

Please sign in to comment.