span> <span class="n">DistanceMatrix</span><span class="p">(</span><span class="n">A</span><span class="p">,</span> <span class="n">method</span> <span class="o">=</span> <span class="s1">&#39;diffusion_distance&#39;</span><span class="p">)</span>
<span class="n">diagram</span> <span class="o">=</span> <span class="n">PH_network</span><span class="p">(</span><span class="n">D</span><span class="p">)</span>

<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;1-D Persistent Homology (l