<span class="p">,</span> <span class="n">n_indices</span><span class="p">)</span>

        <span class="c1"># Calculate numerically with extension</span>
        <span class="k">if</span> <span class="n">method</span> <span class="o">==</span> <span class="s2">&quot;numerical&quot;</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">derivatives_numerical</span><span class="p">(</span>
                <span class="n">d</span><span class="p">,</span> 