mirror of
https://github.com/fjosw/pyerrors.git
synced 2026-03-31 07:39:11 +02:00
Documentation updated
This commit is contained in:
parent
cff0b8ee1e
commit
dac2ee6732
7 changed files with 466 additions and 146 deletions
|
|
@ -45,9 +45,7 @@
|
||||||
|
|
||||||
<h2>Contents</h2>
|
<h2>Contents</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#what-is-pyerrors">What is pyerrors?</a></li>
|
<li><a href="#what-is-pyerrors">What is pyerrors?</a>
|
||||||
<li><a href="#the-obs-class">The"> class</a></li>
|
|
||||||
<li><a href="#the-covobs-class">The"> class</a>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#installation">Installation</a></li>
|
<li><a href="#installation">Installation</a></li>
|
||||||
<li><a href="#basic-example">Basic example</a></li>
|
<li><a href="#basic-example">Basic example</a></li>
|
||||||
|
|
|
||||||
|
|
@ -1216,8 +1216,7 @@ extracted DistillationContration data</li>
|
||||||
</span></pre></div>
|
</span></pre></div>
|
||||||
|
|
||||||
|
|
||||||
<div class="docstring"><p>ndarray(shape, dtype=float, buffer=None, offset=0,
|
<div class="docstring"><p>ndarray(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)</p>
|
||||||
strides=None, order=None)</p>
|
|
||||||
|
|
||||||
<p>An array object represents a multidimensional, homogeneous array
|
<p>An array object represents a multidimensional, homogeneous array
|
||||||
of fixed-size items. An associated data-type object describes the
|
of fixed-size items. An associated data-type object describes the
|
||||||
|
|
@ -1239,7 +1238,8 @@ methods and attributes of an array.</p>
|
||||||
<li><strong>shape</strong> (tuple of ints):
|
<li><strong>shape</strong> (tuple of ints):
|
||||||
Shape of created array.</li>
|
Shape of created array.</li>
|
||||||
<li><strong>dtype</strong> (data-type, optional):
|
<li><strong>dtype</strong> (data-type, optional):
|
||||||
Any object that can be interpreted as a numpy data type.</li>
|
Any object that can be interpreted as a numpy data type.
|
||||||
|
Default is <code>numpy.float64</code>.</li>
|
||||||
<li><strong>buffer</strong> (object exposing buffer interface, optional):
|
<li><strong>buffer</strong> (object exposing buffer interface, optional):
|
||||||
Used to fill the array with data.</li>
|
Used to fill the array with data.</li>
|
||||||
<li><strong>offset</strong> (int, optional):
|
<li><strong>offset</strong> (int, optional):
|
||||||
|
|
|
||||||
|
|
@ -2627,7 +2627,7 @@ The quark combination extension to match the files against.</li>
|
||||||
The correlator to extract data for.</li>
|
The correlator to extract data for.</li>
|
||||||
<li><strong>sep</strong> (str, optional):
|
<li><strong>sep</strong> (str, optional):
|
||||||
The separator to use when parsing the replika names.</li>
|
The separator to use when parsing the replika names.</li>
|
||||||
<li><p><strong>**kwargs</strong>: Additional keyword arguments. The following keyword arguments are recognized:</p>
|
<li><p>**<strong>kwargs</strong>: Additional keyword arguments. The following keyword arguments are recognized:</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>names (List[str]): A list of names to use for the replicas.</li>
|
<li>names (List[str]): A list of names to use for the replicas.</li>
|
||||||
|
|
|
||||||
|
|
@ -232,9 +232,9 @@
|
||||||
</span><span id="L-145"><a href="#L-145"><span class="linenos">145</span></a> <span class="n">serialize</span> <span class="o">=</span> <span class="n">_need_to_serialize</span><span class="p">(</span><span class="n">out</span><span class="p">[</span><span class="n">column</span><span class="p">])</span>
|
</span><span id="L-145"><a href="#L-145"><span class="linenos">145</span></a> <span class="n">serialize</span> <span class="o">=</span> <span class="n">_need_to_serialize</span><span class="p">(</span><span class="n">out</span><span class="p">[</span><span class="n">column</span><span class="p">])</span>
|
||||||
</span><span id="L-146"><a href="#L-146"><span class="linenos">146</span></a>
|
</span><span id="L-146"><a href="#L-146"><span class="linenos">146</span></a>
|
||||||
</span><span id="L-147"><a href="#L-147"><span class="linenos">147</span></a> <span class="k">if</span> <span class="n">serialize</span> <span class="ow">is</span> <span class="kc">True</span><span class="p">:</span>
|
</span><span id="L-147"><a href="#L-147"><span class="linenos">147</span></a> <span class="k">if</span> <span class="n">serialize</span> <span class="ow">is</span> <span class="kc">True</span><span class="p">:</span>
|
||||||
</span><span id="L-148"><a href="#L-148"><span class="linenos">148</span></a> <span class="n">out</span><span class="p">[</span><span class="n">column</span><span class="p">]</span> <span class="o">=</span> <span class="n">out</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">create_json_string</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">indent</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span> <span class="k">if</span> <span class="n">x</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="k">else</span> <span class="kc">None</span><span class="p">)</span>
|
</span><span id="L-148"><a href="#L-148"><span class="linenos">148</span></a> <span class="n">out</span><span class="p">[</span><span class="n">column</span><span class="p">]</span> <span class="o">=</span> <span class="n">out</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">create_json_string</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">indent</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">_is_null</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="k">else</span> <span class="kc">None</span><span class="p">)</span>
|
||||||
</span><span id="L-149"><a href="#L-149"><span class="linenos">149</span></a> <span class="k">if</span> <span class="n">gz</span> <span class="ow">is</span> <span class="kc">True</span><span class="p">:</span>
|
</span><span id="L-149"><a href="#L-149"><span class="linenos">149</span></a> <span class="k">if</span> <span class="n">gz</span> <span class="ow">is</span> <span class="kc">True</span><span class="p">:</span>
|
||||||
</span><span id="L-150"><a href="#L-150"><span class="linenos">150</span></a> <span class="n">out</span><span class="p">[</span><span class="n">column</span><span class="p">]</span> <span class="o">=</span> <span class="n">out</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">gzip</span><span class="o">.</span><span class="n">compress</span><span class="p">((</span><span class="n">x</span> <span class="k">if</span> <span class="n">x</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="k">else</span> <span class="s1">''</span><span class="p">)</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s1">'utf-8'</span><span class="p">)))</span>
|
</span><span id="L-150"><a href="#L-150"><span class="linenos">150</span></a> <span class="n">out</span><span class="p">[</span><span class="n">column</span><span class="p">]</span> <span class="o">=</span> <span class="n">out</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">gzip</span><span class="o">.</span><span class="n">compress</span><span class="p">(</span><span class="n">x</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s1">'utf-8'</span><span class="p">))</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">_is_null</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="k">else</span> <span class="n">gzip</span><span class="o">.</span><span class="n">compress</span><span class="p">(</span><span class="sa">b</span><span class="s1">''</span><span class="p">))</span>
|
||||||
</span><span id="L-151"><a href="#L-151"><span class="linenos">151</span></a> <span class="k">return</span> <span class="n">out</span>
|
</span><span id="L-151"><a href="#L-151"><span class="linenos">151</span></a> <span class="k">return</span> <span class="n">out</span>
|
||||||
</span><span id="L-152"><a href="#L-152"><span class="linenos">152</span></a>
|
</span><span id="L-152"><a href="#L-152"><span class="linenos">152</span></a>
|
||||||
</span><span id="L-153"><a href="#L-153"><span class="linenos">153</span></a>
|
</span><span id="L-153"><a href="#L-153"><span class="linenos">153</span></a>
|
||||||
|
|
@ -253,40 +253,52 @@
|
||||||
</span><span id="L-166"><a href="#L-166"><span class="linenos">166</span></a><span class="sd"> ------</span>
|
</span><span id="L-166"><a href="#L-166"><span class="linenos">166</span></a><span class="sd"> ------</span>
|
||||||
</span><span id="L-167"><a href="#L-167"><span class="linenos">167</span></a><span class="sd"> In case any column of the DataFrame is gzipped it is gunzipped in the process.</span>
|
</span><span id="L-167"><a href="#L-167"><span class="linenos">167</span></a><span class="sd"> In case any column of the DataFrame is gzipped it is gunzipped in the process.</span>
|
||||||
</span><span id="L-168"><a href="#L-168"><span class="linenos">168</span></a><span class="sd"> """</span>
|
</span><span id="L-168"><a href="#L-168"><span class="linenos">168</span></a><span class="sd"> """</span>
|
||||||
</span><span id="L-169"><a href="#L-169"><span class="linenos">169</span></a> <span class="k">for</span> <span class="n">column</span> <span class="ow">in</span> <span class="n">df</span><span class="o">.</span><span class="n">select_dtypes</span><span class="p">(</span><span class="n">include</span><span class="o">=</span><span class="s2">"object"</span><span class="p">):</span>
|
</span><span id="L-169"><a href="#L-169"><span class="linenos">169</span></a> <span class="c1"># In pandas 3+, string columns use 'str' dtype instead of 'object'</span>
|
||||||
</span><span id="L-170"><a href="#L-170"><span class="linenos">170</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">][</span><span class="mi">0</span><span class="p">],</span> <span class="nb">bytes</span><span class="p">):</span>
|
</span><span id="L-170"><a href="#L-170"><span class="linenos">170</span></a> <span class="n">string_like_dtypes</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"object"</span><span class="p">,</span> <span class="s2">"str"</span><span class="p">]</span> <span class="k">if</span> <span class="nb">int</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">__version__</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">"."</span><span class="p">)[</span><span class="mi">0</span><span class="p">])</span> <span class="o">>=</span> <span class="mi">3</span> <span class="k">else</span> <span class="p">[</span><span class="s2">"object"</span><span class="p">]</span>
|
||||||
</span><span id="L-171"><a href="#L-171"><span class="linenos">171</span></a> <span class="k">if</span> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="sa">b</span><span class="s2">"</span><span class="se">\x1f\x8b\x08\x00</span><span class="s2">"</span><span class="p">):</span>
|
</span><span id="L-171"><a href="#L-171"><span class="linenos">171</span></a> <span class="k">for</span> <span class="n">column</span> <span class="ow">in</span> <span class="n">df</span><span class="o">.</span><span class="n">select_dtypes</span><span class="p">(</span><span class="n">include</span><span class="o">=</span><span class="n">string_like_dtypes</span><span class="p">):</span>
|
||||||
</span><span id="L-172"><a href="#L-172"><span class="linenos">172</span></a> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span> <span class="o">=</span> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">gzip</span><span class="o">.</span><span class="n">decompress</span><span class="p">(</span><span class="n">x</span><span class="p">)</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">'utf-8'</span><span class="p">))</span>
|
</span><span id="L-172"><a href="#L-172"><span class="linenos">172</span></a> <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">])</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
|
||||||
</span><span id="L-173"><a href="#L-173"><span class="linenos">173</span></a>
|
</span><span id="L-173"><a href="#L-173"><span class="linenos">173</span></a> <span class="k">continue</span>
|
||||||
</span><span id="L-174"><a href="#L-174"><span class="linenos">174</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="nb">all</span><span class="p">([</span><span class="n">e</span> <span class="ow">is</span> <span class="kc">None</span> <span class="k">for</span> <span class="n">e</span> <span class="ow">in</span> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]]):</span>
|
</span><span id="L-174"><a href="#L-174"><span class="linenos">174</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="nb">bytes</span><span class="p">):</span>
|
||||||
</span><span id="L-175"><a href="#L-175"><span class="linenos">175</span></a> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span> <span class="o">=</span> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">replace</span><span class="p">({</span><span class="sa">r</span><span class="s1">'^$'</span><span class="p">:</span> <span class="kc">None</span><span class="p">},</span> <span class="n">regex</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
</span><span id="L-175"><a href="#L-175"><span class="linenos">175</span></a> <span class="k">if</span> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="sa">b</span><span class="s2">"</span><span class="se">\x1f\x8b\x08\x00</span><span class="s2">"</span><span class="p">):</span>
|
||||||
</span><span id="L-176"><a href="#L-176"><span class="linenos">176</span></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
|
</span><span id="L-176"><a href="#L-176"><span class="linenos">176</span></a> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span> <span class="o">=</span> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">gzip</span><span class="o">.</span><span class="n">decompress</span><span class="p">(</span><span class="n">x</span><span class="p">)</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">'utf-8'</span><span class="p">)</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">pd</span><span class="o">.</span><span class="n">isna</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="k">else</span> <span class="s1">''</span><span class="p">)</span>
|
||||||
</span><span id="L-177"><a href="#L-177"><span class="linenos">177</span></a> <span class="k">while</span> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">][</span><span class="n">i</span><span class="p">]</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
|
</span><span id="L-177"><a href="#L-177"><span class="linenos">177</span></a>
|
||||||
</span><span id="L-178"><a href="#L-178"><span class="linenos">178</span></a> <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
|
</span><span id="L-178"><a href="#L-178"><span class="linenos">178</span></a> <span class="k">if</span> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">notna</span><span class="p">()</span><span class="o">.</span><span class="n">any</span><span class="p">():</span>
|
||||||
</span><span id="L-179"><a href="#L-179"><span class="linenos">179</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">][</span><span class="n">i</span><span class="p">],</span> <span class="nb">str</span><span class="p">):</span>
|
</span><span id="L-179"><a href="#L-179"><span class="linenos">179</span></a> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span> <span class="o">=</span> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">replace</span><span class="p">({</span><span class="sa">r</span><span class="s1">'^$'</span><span class="p">:</span> <span class="kc">None</span><span class="p">},</span> <span class="n">regex</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
||||||
</span><span id="L-180"><a href="#L-180"><span class="linenos">180</span></a> <span class="k">if</span> <span class="s1">'"program":'</span> <span class="ow">in</span> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">][</span><span class="n">i</span><span class="p">][:</span><span class="mi">20</span><span class="p">]:</span>
|
</span><span id="L-180"><a href="#L-180"><span class="linenos">180</span></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
|
||||||
</span><span id="L-181"><a href="#L-181"><span class="linenos">181</span></a> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span> <span class="o">=</span> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">import_json_string</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">verbose</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> <span class="k">if</span> <span class="n">x</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="k">else</span> <span class="kc">None</span><span class="p">)</span>
|
</span><span id="L-181"><a href="#L-181"><span class="linenos">181</span></a> <span class="k">while</span> <span class="n">i</span> <span class="o"><</span> <span class="nb">len</span><span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">])</span> <span class="ow">and</span> <span class="n">pd</span><span class="o">.</span><span class="n">isna</span><span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="n">i</span><span class="p">]):</span>
|
||||||
</span><span id="L-182"><a href="#L-182"><span class="linenos">182</span></a> <span class="k">if</span> <span class="n">auto_gamma</span> <span class="ow">is</span> <span class="kc">True</span><span class="p">:</span>
|
</span><span id="L-182"><a href="#L-182"><span class="linenos">182</span></a> <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||||
</span><span id="L-183"><a href="#L-183"><span class="linenos">183</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">][</span><span class="n">i</span><span class="p">],</span> <span class="nb">list</span><span class="p">):</span>
|
</span><span id="L-183"><a href="#L-183"><span class="linenos">183</span></a> <span class="k">if</span> <span class="n">i</span> <span class="o"><</span> <span class="nb">len</span><span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">])</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="nb">str</span><span class="p">):</span>
|
||||||
</span><span id="L-184"><a href="#L-184"><span class="linenos">184</span></a> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="p">[</span><span class="n">o</span><span class="o">.</span><span class="n">gm</span><span class="p">()</span> <span class="k">if</span> <span class="n">o</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="k">else</span> <span class="n">x</span> <span class="k">for</span> <span class="n">o</span> <span class="ow">in</span> <span class="n">x</span><span class="p">])</span>
|
</span><span id="L-184"><a href="#L-184"><span class="linenos">184</span></a> <span class="k">if</span> <span class="s1">'"program":'</span> <span class="ow">in</span> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="n">i</span><span class="p">][:</span><span class="mi">20</span><span class="p">]:</span>
|
||||||
</span><span id="L-185"><a href="#L-185"><span class="linenos">185</span></a> <span class="k">else</span><span class="p">:</span>
|
</span><span id="L-185"><a href="#L-185"><span class="linenos">185</span></a> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span> <span class="o">=</span> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">import_json_string</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">verbose</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">pd</span><span class="o">.</span><span class="n">isna</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="k">else</span> <span class="kc">None</span><span class="p">)</span>
|
||||||
</span><span id="L-186"><a href="#L-186"><span class="linenos">186</span></a> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span><span class="o">.</span><span class="n">gm</span><span class="p">()</span> <span class="k">if</span> <span class="n">x</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="k">else</span> <span class="n">x</span><span class="p">)</span>
|
</span><span id="L-186"><a href="#L-186"><span class="linenos">186</span></a> <span class="k">if</span> <span class="n">auto_gamma</span> <span class="ow">is</span> <span class="kc">True</span><span class="p">:</span>
|
||||||
</span><span id="L-187"><a href="#L-187"><span class="linenos">187</span></a> <span class="k">return</span> <span class="n">df</span>
|
</span><span id="L-187"><a href="#L-187"><span class="linenos">187</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="nb">list</span><span class="p">):</span>
|
||||||
</span><span id="L-188"><a href="#L-188"><span class="linenos">188</span></a>
|
</span><span id="L-188"><a href="#L-188"><span class="linenos">188</span></a> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="p">[</span><span class="n">o</span><span class="o">.</span><span class="n">gm</span><span class="p">()</span> <span class="k">if</span> <span class="n">o</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="k">else</span> <span class="n">x</span> <span class="k">for</span> <span class="n">o</span> <span class="ow">in</span> <span class="n">x</span><span class="p">]</span> <span class="k">if</span> <span class="n">x</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="k">else</span> <span class="n">x</span><span class="p">)</span>
|
||||||
</span><span id="L-189"><a href="#L-189"><span class="linenos">189</span></a>
|
</span><span id="L-189"><a href="#L-189"><span class="linenos">189</span></a> <span class="k">else</span><span class="p">:</span>
|
||||||
</span><span id="L-190"><a href="#L-190"><span class="linenos">190</span></a><span class="k">def</span><span class="w"> </span><span class="nf">_need_to_serialize</span><span class="p">(</span><span class="n">col</span><span class="p">):</span>
|
</span><span id="L-190"><a href="#L-190"><span class="linenos">190</span></a> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span><span class="o">.</span><span class="n">gm</span><span class="p">()</span> <span class="k">if</span> <span class="n">x</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="k">else</span> <span class="n">x</span><span class="p">)</span>
|
||||||
</span><span id="L-191"><a href="#L-191"><span class="linenos">191</span></a> <span class="n">serialize</span> <span class="o">=</span> <span class="kc">False</span>
|
</span><span id="L-191"><a href="#L-191"><span class="linenos">191</span></a> <span class="c1"># Convert NA values back to Python None for compatibility with `x is None` checks</span>
|
||||||
</span><span id="L-192"><a href="#L-192"><span class="linenos">192</span></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
|
</span><span id="L-192"><a href="#L-192"><span class="linenos">192</span></a> <span class="k">if</span> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">isna</span><span class="p">()</span><span class="o">.</span><span class="n">any</span><span class="p">():</span>
|
||||||
</span><span id="L-193"><a href="#L-193"><span class="linenos">193</span></a> <span class="k">while</span> <span class="n">i</span> <span class="o"><</span> <span class="nb">len</span><span class="p">(</span><span class="n">col</span><span class="p">)</span> <span class="ow">and</span> <span class="n">col</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
|
</span><span id="L-193"><a href="#L-193"><span class="linenos">193</span></a> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span> <span class="o">=</span> <span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="nb">object</span><span class="p">)</span><span class="o">.</span><span class="n">where</span><span class="p">(</span><span class="n">df</span><span class="p">[</span><span class="n">column</span><span class="p">]</span><span class="o">.</span><span class="n">notna</span><span class="p">(),</span> <span class="kc">None</span><span class="p">)</span>
|
||||||
</span><span id="L-194"><a href="#L-194"><span class="linenos">194</span></a> <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
|
</span><span id="L-194"><a href="#L-194"><span class="linenos">194</span></a> <span class="k">return</span> <span class="n">df</span>
|
||||||
</span><span id="L-195"><a href="#L-195"><span class="linenos">195</span></a> <span class="k">if</span> <span class="n">i</span> <span class="o">==</span> <span class="nb">len</span><span class="p">(</span><span class="n">col</span><span class="p">):</span>
|
</span><span id="L-195"><a href="#L-195"><span class="linenos">195</span></a>
|
||||||
</span><span id="L-196"><a href="#L-196"><span class="linenos">196</span></a> <span class="k">return</span> <span class="n">serialize</span>
|
</span><span id="L-196"><a href="#L-196"><span class="linenos">196</span></a>
|
||||||
</span><span id="L-197"><a href="#L-197"><span class="linenos">197</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">col</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="p">(</span><span class="n">Obs</span><span class="p">,</span> <span class="n">Corr</span><span class="p">)):</span>
|
</span><span id="L-197"><a href="#L-197"><span class="linenos">197</span></a><span class="k">def</span><span class="w"> </span><span class="nf">_need_to_serialize</span><span class="p">(</span><span class="n">col</span><span class="p">):</span>
|
||||||
</span><span id="L-198"><a href="#L-198"><span class="linenos">198</span></a> <span class="n">serialize</span> <span class="o">=</span> <span class="kc">True</span>
|
</span><span id="L-198"><a href="#L-198"><span class="linenos">198</span></a> <span class="n">serialize</span> <span class="o">=</span> <span class="kc">False</span>
|
||||||
</span><span id="L-199"><a href="#L-199"><span class="linenos">199</span></a> <span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">col</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="nb">list</span><span class="p">):</span>
|
</span><span id="L-199"><a href="#L-199"><span class="linenos">199</span></a> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
|
||||||
</span><span id="L-200"><a href="#L-200"><span class="linenos">200</span></a> <span class="k">if</span> <span class="nb">all</span><span class="p">(</span><span class="nb">isinstance</span><span class="p">(</span><span class="n">o</span><span class="p">,</span> <span class="n">Obs</span><span class="p">)</span> <span class="k">for</span> <span class="n">o</span> <span class="ow">in</span> <span class="n">col</span><span class="p">[</span><span class="n">i</span><span class="p">]):</span>
|
</span><span id="L-200"><a href="#L-200"><span class="linenos">200</span></a> <span class="k">while</span> <span class="n">i</span> <span class="o"><</span> <span class="nb">len</span><span class="p">(</span><span class="n">col</span><span class="p">)</span> <span class="ow">and</span> <span class="n">_is_null</span><span class="p">(</span><span class="n">col</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="n">i</span><span class="p">]):</span>
|
||||||
</span><span id="L-201"><a href="#L-201"><span class="linenos">201</span></a> <span class="n">serialize</span> <span class="o">=</span> <span class="kc">True</span>
|
</span><span id="L-201"><a href="#L-201"><span class="linenos">201</span></a> <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
|
||||||
</span><span id="L-202"><a href="#L-202"><span class="linenos">202</span></a> <span class="k">return</span> <span class="n">serialize</span>
|
</span><span id="L-202"><a href="#L-202"><span class="linenos">202</span></a> <span class="k">if</span> <span class="n">i</span> <span class="o">==</span> <span class="nb">len</span><span class="p">(</span><span class="n">col</span><span class="p">):</span>
|
||||||
|
</span><span id="L-203"><a href="#L-203"><span class="linenos">203</span></a> <span class="k">return</span> <span class="n">serialize</span>
|
||||||
|
</span><span id="L-204"><a href="#L-204"><span class="linenos">204</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">col</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="p">(</span><span class="n">Obs</span><span class="p">,</span> <span class="n">Corr</span><span class="p">)):</span>
|
||||||
|
</span><span id="L-205"><a href="#L-205"><span class="linenos">205</span></a> <span class="n">serialize</span> <span class="o">=</span> <span class="kc">True</span>
|
||||||
|
</span><span id="L-206"><a href="#L-206"><span class="linenos">206</span></a> <span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">col</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="nb">list</span><span class="p">):</span>
|
||||||
|
</span><span id="L-207"><a href="#L-207"><span class="linenos">207</span></a> <span class="k">if</span> <span class="nb">all</span><span class="p">(</span><span class="nb">isinstance</span><span class="p">(</span><span class="n">o</span><span class="p">,</span> <span class="n">Obs</span><span class="p">)</span> <span class="k">for</span> <span class="n">o</span> <span class="ow">in</span> <span class="n">col</span><span class="o">.</span><span class="n">iloc</span><span class="p">[</span><span class="n">i</span><span class="p">]):</span>
|
||||||
|
</span><span id="L-208"><a href="#L-208"><span class="linenos">208</span></a> <span class="n">serialize</span> <span class="o">=</span> <span class="kc">True</span>
|
||||||
|
</span><span id="L-209"><a href="#L-209"><span class="linenos">209</span></a> <span class="k">return</span> <span class="n">serialize</span>
|
||||||
|
</span><span id="L-210"><a href="#L-210"><span class="linenos">210</span></a>
|
||||||
|
</span><span id="L-211"><a href="#L-211"><span class="linenos">211</span></a>
|
||||||
|
</span><span id="L-212"><a href="#L-212"><span class="linenos">212</span></a><span class="k">def</span><span class="w"> </span><span class="nf">_is_null</span><span class="p">(</span><span class="n">val</span><span class="p">):</span>
|
||||||
|
</span><span id="L-213"><a href="#L-213"><span class="linenos">213</span></a><span class="w"> </span><span class="sd">"""Check if a value is null (None or NA), handling list/array values."""</span>
|
||||||
|
</span><span id="L-214"><a href="#L-214"><span class="linenos">214</span></a> <span class="k">return</span> <span class="kc">False</span> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">val</span><span class="p">,</span> <span class="p">(</span><span class="nb">list</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">))</span> <span class="k">else</span> <span class="n">pd</span><span class="o">.</span><span class="n">isna</span><span class="p">(</span><span class="n">val</span><span class="p">)</span>
|
||||||
</span></pre></div>
|
</span></pre></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -316,7 +316,7 @@
|
||||||
<div class="attr function">
|
<div class="attr function">
|
||||||
|
|
||||||
<span class="def">def</span>
|
<span class="def">def</span>
|
||||||
<span class="name">errorbar</span><span class="signature pdoc-code multiline">(<span class="param"> <span class="n">x</span>,</span><span class="param"> <span class="n">y</span>,</span><span class="param"> <span class="n">axes</span><span class="o">=<</span><span class="n">module</span> <span class="s1">'matplotlib.pyplot'</span> <span class="kn">from</span><span class="w"> </span><span class="s1">'/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/site-packages/matplotlib/pyplot.py'</span><span class="o">></span>,</span><span class="param"> <span class="o">**</span><span class="n">kwargs</span></span><span class="return-annotation">):</span></span>
|
<span class="name">errorbar</span><span class="signature pdoc-code multiline">(<span class="param"> <span class="n">x</span>,</span><span class="param"> <span class="n">y</span>,</span><span class="param"> <span class="n">axes</span><span class="o">=<</span><span class="n">module</span> <span class="s1">'matplotlib.pyplot'</span> <span class="kn">from</span><span class="w"> </span><span class="s1">'/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/matplotlib/pyplot.py'</span><span class="o">></span>,</span><span class="param"> <span class="o">**</span><span class="n">kwargs</span></span><span class="return-annotation">):</span></span>
|
||||||
|
|
||||||
<label class="view-source-button" for="errorbar-view-source"><span>View Source</span></label>
|
<label class="view-source-button" for="errorbar-view-source"><span>View Source</span></label>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -408,6 +408,8 @@ indeterminate when considering the simultaneous limit <code>(a, x) -> (0+, 0+
|
||||||
<p>This function wraps the <code>ibeta</code> routine from the
|
<p>This function wraps the <code>ibeta</code> routine from the
|
||||||
Boost Math C++ library <sup class="footnote-ref" id="fnref-2"><a href="#fn-2">2</a></sup>.</p>
|
Boost Math C++ library <sup class="footnote-ref" id="fnref-2"><a href="#fn-2">2</a></sup>.</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
<p><code><a href="#betainc">betainc</a></code> has experimental support for Python Array API Standard compatible
|
<p><code><a href="#betainc">betainc</a></code> has experimental support for Python Array API Standard compatible
|
||||||
backends in addition to NumPy. Please consider testing these features
|
backends in addition to NumPy. Please consider testing these features
|
||||||
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
|
@ -424,7 +426,8 @@ JAX ✅ ✅<br />
|
||||||
Dask ✅ n/a<br />
|
Dask ✅ n/a<br />
|
||||||
==================== ==================== ====================</p>
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
<p>See :ref:<code>dev-arrayapi</code> for more information.</p>
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
|
|
@ -518,9 +521,7 @@ where \( F \) is the hypergeometric function <code>hyp2f1</code>:</p>
|
||||||
</span></pre></div>
|
</span></pre></div>
|
||||||
|
|
||||||
|
|
||||||
<div class="docstring"><p>betaln(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature])</p>
|
<div class="docstring"><p>betaln(a, b, out=None)</p>
|
||||||
|
|
||||||
<p>betaln(a, b, out=None)</p>
|
|
||||||
|
|
||||||
<p>Natural logarithm of absolute value of beta function.</p>
|
<p>Natural logarithm of absolute value of beta function.</p>
|
||||||
|
|
||||||
|
|
@ -543,9 +544,35 @@ Optional output array for function values</li>
|
||||||
|
|
||||||
<h6 id="see-also">See Also</h6>
|
<h6 id="see-also">See Also</h6>
|
||||||
|
|
||||||
<p><code><a href="#gamma">gamma</a></code>: the gamma function<br />
|
<p><code>gamma()`
|
||||||
<code><a href="#betainc">betainc</a></code>: the regularized incomplete beta function<br />
|
the`, `gamma`, `function`
|
||||||
<code><a href="#beta">beta</a></code>: the beta function </p>
|
</code>betainc()<code>
|
||||||
|
the</code>, <code>regularized</code>, <code>incomplete</code>, <code><a href="#beta">beta</a></code>, <code>function</code><br />
|
||||||
|
`<code><a href="#beta">beta()</a></code>
|
||||||
|
the<code>,</code>beta<code>,</code>function` </p>
|
||||||
|
|
||||||
|
<h6 id="notes">Notes</h6>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
|
<p><code><a href="#betaln">betaln</a></code> has experimental support for Python Array API Standard compatible
|
||||||
|
backends in addition to NumPy. Please consider testing these features
|
||||||
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following
|
||||||
|
combinations of backend and device (or other capability) are supported.</p>
|
||||||
|
|
||||||
|
<p>==================== ==================== ====================
|
||||||
|
Library CPU GPU
|
||||||
|
==================== ==================== ====================
|
||||||
|
NumPy ✅ n/a<br />
|
||||||
|
CuPy n/a ✅<br />
|
||||||
|
PyTorch ✅ ⛔<br />
|
||||||
|
JAX ✅ ✅<br />
|
||||||
|
Dask ✅ n/a<br />
|
||||||
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="examples">Examples</h6>
|
<h6 id="examples">Examples</h6>
|
||||||
|
|
||||||
|
|
@ -644,7 +671,31 @@ Real valued input</li>
|
||||||
|
|
||||||
<h6 id="see-also">See Also</h6>
|
<h6 id="see-also">See Also</h6>
|
||||||
|
|
||||||
<p><code><a href="#digamma">digamma</a></code> </p>
|
<p>`<code><a href="#digamma">digamma()</a></code>
|
||||||
|
..` </p>
|
||||||
|
|
||||||
|
<h6 id="notes">Notes</h6>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
|
<p><code><a href="#polygamma">polygamma</a></code> has experimental support for Python Array API Standard compatible
|
||||||
|
backends in addition to NumPy. Please consider testing these features
|
||||||
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following
|
||||||
|
combinations of backend and device (or other capability) are supported.</p>
|
||||||
|
|
||||||
|
<p>==================== ==================== ====================
|
||||||
|
Library CPU GPU
|
||||||
|
==================== ==================== ====================
|
||||||
|
NumPy ✅ n/a<br />
|
||||||
|
CuPy n/a ✅<br />
|
||||||
|
PyTorch ✅ ✅<br />
|
||||||
|
JAX ✅ ✅<br />
|
||||||
|
Dask ✅ n/a<br />
|
||||||
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
|
|
@ -695,9 +746,7 @@ Real valued input</li>
|
||||||
</span></pre></div>
|
</span></pre></div>
|
||||||
|
|
||||||
|
|
||||||
<div class="docstring"><p>psi(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature])</p>
|
<div class="docstring"><p>psi(z, out=None)</p>
|
||||||
|
|
||||||
<p>psi(z, out=None)</p>
|
|
||||||
|
|
||||||
<p>The digamma function.</p>
|
<p>The digamma function.</p>
|
||||||
|
|
||||||
|
|
@ -724,17 +773,38 @@ Computed values of <code><a href="#psi">psi</a></code>.</li>
|
||||||
<p>For large values not close to the negative real axis, <code><a href="#psi">psi</a></code> is
|
<p>For large values not close to the negative real axis, <code><a href="#psi">psi</a></code> is
|
||||||
computed using the asymptotic series (5.11.2) from <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup>. For small
|
computed using the asymptotic series (5.11.2) from <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup>. For small
|
||||||
arguments not close to the negative real axis, the recurrence
|
arguments not close to the negative real axis, the recurrence
|
||||||
relation (5.5.2) from <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">2</a></sup> is used until the argument is large
|
relation (5.5.2) from <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup> is used until the argument is large
|
||||||
enough to use the asymptotic series. For values close to the
|
enough to use the asymptotic series. For values close to the
|
||||||
negative real axis, the reflection formula (5.5.4) from <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">3</a></sup> is
|
negative real axis, the reflection formula (5.5.4) from <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup> is
|
||||||
used first. Note that <code><a href="#psi">psi</a></code> has a family of zeros on the
|
used first. Note that <code><a href="#psi">psi</a></code> has a family of zeros on the
|
||||||
negative real axis which occur between the poles at nonpositive
|
negative real axis which occur between the poles at nonpositive
|
||||||
integers. Around the zeros the reflection formula suffers from
|
integers. Around the zeros the reflection formula suffers from
|
||||||
cancellation and the implementation loses precision. The sole
|
cancellation and the implementation loses precision. The sole
|
||||||
positive zero and the first negative zero, however, are handled
|
positive zero and the first negative zero, however, are handled
|
||||||
separately by precomputing series expansions using <sup class="footnote-ref" id="fnref-2"><a href="#fn-2">4</a></sup>, so the
|
separately by precomputing series expansions using <sup class="footnote-ref" id="fnref-2"><a href="#fn-2">2</a></sup>, so the
|
||||||
function should maintain full accuracy around the origin.</p>
|
function should maintain full accuracy around the origin.</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
|
<p><code><a href="#psi">psi</a></code> has experimental support for Python Array API Standard compatible
|
||||||
|
backends in addition to NumPy. Please consider testing these features
|
||||||
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following
|
||||||
|
combinations of backend and device (or other capability) are supported.</p>
|
||||||
|
|
||||||
|
<p>==================== ==================== ====================
|
||||||
|
Library CPU GPU
|
||||||
|
==================== ==================== ====================
|
||||||
|
NumPy ✅ n/a<br />
|
||||||
|
CuPy n/a ✅<br />
|
||||||
|
PyTorch ✅ ✅<br />
|
||||||
|
JAX ✅ ✅<br />
|
||||||
|
Dask ✅ n/a<br />
|
||||||
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
<h6 id="examples">Examples</h6>
|
<h6 id="examples">Examples</h6>
|
||||||
|
|
@ -763,20 +833,10 @@ function should maintain full accuracy around the origin.</p>
|
||||||
<a href="https://dlmf.nist.gov/5">https://dlmf.nist.gov/5</a> <a href="#fnref-1" class="footnoteBackLink" title="Jump back to footnote 1 in the text.">↩</a></p>
|
<a href="https://dlmf.nist.gov/5">https://dlmf.nist.gov/5</a> <a href="#fnref-1" class="footnoteBackLink" title="Jump back to footnote 1 in the text.">↩</a></p>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li id="fn-1">
|
|
||||||
<p>NIST Digital Library of Mathematical Functions
|
|
||||||
<a href="https://dlmf.nist.gov/5">https://dlmf.nist.gov/5</a> <a href="#fnref-1" class="footnoteBackLink" title="Jump back to footnote 2 in the text.">↩</a></p>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li id="fn-1">
|
|
||||||
<p>NIST Digital Library of Mathematical Functions
|
|
||||||
<a href="https://dlmf.nist.gov/5">https://dlmf.nist.gov/5</a> <a href="#fnref-1" class="footnoteBackLink" title="Jump back to footnote 3 in the text.">↩</a></p>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li id="fn-2">
|
<li id="fn-2">
|
||||||
<p>Fredrik Johansson and others.
|
<p>Fredrik Johansson and others.
|
||||||
"mpmath: a Python library for arbitrary-precision floating-point arithmetic"
|
"mpmath: a Python library for arbitrary-precision floating-point arithmetic"
|
||||||
(Version 0.19) <a href="http://mpmath.org/">http://mpmath.org/</a> <a href="#fnref-2" class="footnoteBackLink" title="Jump back to footnote 4 in the text.">↩</a></p>
|
(Version 0.19) <a href="http://mpmath.org/">http://mpmath.org/</a> <a href="#fnref-2" class="footnoteBackLink" title="Jump back to footnote 2 in the text.">↩</a></p>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -813,9 +873,7 @@ function should maintain full accuracy around the origin.</p>
|
||||||
</span></pre></div>
|
</span></pre></div>
|
||||||
|
|
||||||
|
|
||||||
<div class="docstring"><p>psi(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature])</p>
|
<div class="docstring"><p>psi(z, out=None)</p>
|
||||||
|
|
||||||
<p>psi(z, out=None)</p>
|
|
||||||
|
|
||||||
<p>The digamma function.</p>
|
<p>The digamma function.</p>
|
||||||
|
|
||||||
|
|
@ -842,17 +900,38 @@ Computed values of <code><a href="#psi">psi</a></code>.</li>
|
||||||
<p>For large values not close to the negative real axis, <code><a href="#psi">psi</a></code> is
|
<p>For large values not close to the negative real axis, <code><a href="#psi">psi</a></code> is
|
||||||
computed using the asymptotic series (5.11.2) from <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup>. For small
|
computed using the asymptotic series (5.11.2) from <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup>. For small
|
||||||
arguments not close to the negative real axis, the recurrence
|
arguments not close to the negative real axis, the recurrence
|
||||||
relation (5.5.2) from <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">2</a></sup> is used until the argument is large
|
relation (5.5.2) from <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup> is used until the argument is large
|
||||||
enough to use the asymptotic series. For values close to the
|
enough to use the asymptotic series. For values close to the
|
||||||
negative real axis, the reflection formula (5.5.4) from <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">3</a></sup> is
|
negative real axis, the reflection formula (5.5.4) from <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup> is
|
||||||
used first. Note that <code><a href="#psi">psi</a></code> has a family of zeros on the
|
used first. Note that <code><a href="#psi">psi</a></code> has a family of zeros on the
|
||||||
negative real axis which occur between the poles at nonpositive
|
negative real axis which occur between the poles at nonpositive
|
||||||
integers. Around the zeros the reflection formula suffers from
|
integers. Around the zeros the reflection formula suffers from
|
||||||
cancellation and the implementation loses precision. The sole
|
cancellation and the implementation loses precision. The sole
|
||||||
positive zero and the first negative zero, however, are handled
|
positive zero and the first negative zero, however, are handled
|
||||||
separately by precomputing series expansions using <sup class="footnote-ref" id="fnref-2"><a href="#fn-2">4</a></sup>, so the
|
separately by precomputing series expansions using <sup class="footnote-ref" id="fnref-2"><a href="#fn-2">2</a></sup>, so the
|
||||||
function should maintain full accuracy around the origin.</p>
|
function should maintain full accuracy around the origin.</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
|
<p><code><a href="#psi">psi</a></code> has experimental support for Python Array API Standard compatible
|
||||||
|
backends in addition to NumPy. Please consider testing these features
|
||||||
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following
|
||||||
|
combinations of backend and device (or other capability) are supported.</p>
|
||||||
|
|
||||||
|
<p>==================== ==================== ====================
|
||||||
|
Library CPU GPU
|
||||||
|
==================== ==================== ====================
|
||||||
|
NumPy ✅ n/a<br />
|
||||||
|
CuPy n/a ✅<br />
|
||||||
|
PyTorch ✅ ✅<br />
|
||||||
|
JAX ✅ ✅<br />
|
||||||
|
Dask ✅ n/a<br />
|
||||||
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
<h6 id="examples">Examples</h6>
|
<h6 id="examples">Examples</h6>
|
||||||
|
|
@ -881,20 +960,10 @@ function should maintain full accuracy around the origin.</p>
|
||||||
<a href="https://dlmf.nist.gov/5">https://dlmf.nist.gov/5</a> <a href="#fnref-1" class="footnoteBackLink" title="Jump back to footnote 1 in the text.">↩</a></p>
|
<a href="https://dlmf.nist.gov/5">https://dlmf.nist.gov/5</a> <a href="#fnref-1" class="footnoteBackLink" title="Jump back to footnote 1 in the text.">↩</a></p>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li id="fn-1">
|
|
||||||
<p>NIST Digital Library of Mathematical Functions
|
|
||||||
<a href="https://dlmf.nist.gov/5">https://dlmf.nist.gov/5</a> <a href="#fnref-1" class="footnoteBackLink" title="Jump back to footnote 2 in the text.">↩</a></p>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li id="fn-1">
|
|
||||||
<p>NIST Digital Library of Mathematical Functions
|
|
||||||
<a href="https://dlmf.nist.gov/5">https://dlmf.nist.gov/5</a> <a href="#fnref-1" class="footnoteBackLink" title="Jump back to footnote 3 in the text.">↩</a></p>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li id="fn-2">
|
<li id="fn-2">
|
||||||
<p>Fredrik Johansson and others.
|
<p>Fredrik Johansson and others.
|
||||||
"mpmath: a Python library for arbitrary-precision floating-point arithmetic"
|
"mpmath: a Python library for arbitrary-precision floating-point arithmetic"
|
||||||
(Version 0.19) <a href="http://mpmath.org/">http://mpmath.org/</a> <a href="#fnref-2" class="footnoteBackLink" title="Jump back to footnote 4 in the text.">↩</a></p>
|
(Version 0.19) <a href="http://mpmath.org/">http://mpmath.org/</a> <a href="#fnref-2" class="footnoteBackLink" title="Jump back to footnote 2 in the text.">↩</a></p>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -931,9 +1000,7 @@ function should maintain full accuracy around the origin.</p>
|
||||||
</span></pre></div>
|
</span></pre></div>
|
||||||
|
|
||||||
|
|
||||||
<div class="docstring"><p>gamma(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature])</p>
|
<div class="docstring"><p>gamma(z, out=None)</p>
|
||||||
|
|
||||||
<p>gamma(z, out=None)</p>
|
|
||||||
|
|
||||||
<p>gamma function.</p>
|
<p>gamma function.</p>
|
||||||
|
|
||||||
|
|
@ -992,6 +1059,27 @@ as</p>
|
||||||
|
|
||||||
<p><code>gamma(u) * gamma(v) * (rgamma(w) * rgamma(x))</code></p>
|
<p><code>gamma(u) * gamma(v) * (rgamma(w) * rgamma(x))</code></p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
|
<p><code><a href="#gamma">gamma</a></code> has experimental support for Python Array API Standard compatible
|
||||||
|
backends in addition to NumPy. Please consider testing these features
|
||||||
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following
|
||||||
|
combinations of backend and device (or other capability) are supported.</p>
|
||||||
|
|
||||||
|
<p>==================== ==================== ====================
|
||||||
|
Library CPU GPU
|
||||||
|
==================== ==================== ====================
|
||||||
|
NumPy ✅ n/a<br />
|
||||||
|
CuPy n/a ✅<br />
|
||||||
|
PyTorch ✅ ⛔<br />
|
||||||
|
JAX ✅ ✅<br />
|
||||||
|
Dask ✅ n/a<br />
|
||||||
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
<p>.. [dlmf] NIST Digital Library of Mathematical Functions
|
<p>.. [dlmf] NIST Digital Library of Mathematical Functions
|
||||||
|
|
@ -1128,6 +1216,8 @@ gammasgn(x) * gamma(x)</code>.</p>
|
||||||
|
|
||||||
<p>For complex-valued log-gamma, use <code>loggamma</code> instead of <code><a href="#gammaln">gammaln</a></code>.</p>
|
<p>For complex-valued log-gamma, use <code>loggamma</code> instead of <code><a href="#gammaln">gammaln</a></code>.</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
<p><code><a href="#gammaln">gammaln</a></code> has experimental support for Python Array API Standard compatible
|
<p><code><a href="#gammaln">gammaln</a></code> has experimental support for Python Array API Standard compatible
|
||||||
backends in addition to NumPy. Please consider testing these features
|
backends in addition to NumPy. Please consider testing these features
|
||||||
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
|
@ -1144,7 +1234,8 @@ JAX ✅ ✅<br />
|
||||||
Dask ✅ n/a<br />
|
Dask ✅ n/a<br />
|
||||||
==================== ==================== ====================</p>
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
<p>See :ref:<code>dev-arrayapi</code> for more information.</p>
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
|
|
@ -1262,6 +1353,8 @@ incomplete gamma function.</p>
|
||||||
|
|
||||||
<p>The implementation largely follows that of [boost]_.</p>
|
<p>The implementation largely follows that of [boost]_.</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
<p><code><a href="#gammainc">gammainc</a></code> has experimental support for Python Array API Standard compatible
|
<p><code><a href="#gammainc">gammainc</a></code> has experimental support for Python Array API Standard compatible
|
||||||
backends in addition to NumPy. Please consider testing these features
|
backends in addition to NumPy. Please consider testing these features
|
||||||
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
|
@ -1278,7 +1371,8 @@ JAX ✅ ✅<br />
|
||||||
Dask ✅ n/a<br />
|
Dask ✅ n/a<br />
|
||||||
==================== ==================== ====================</p>
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
<p>See :ref:<code>dev-arrayapi</code> for more information.</p>
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
|
|
@ -1390,6 +1484,8 @@ incomplete gamma function.</p>
|
||||||
|
|
||||||
<p>The implementation largely follows that of [boost]_.</p>
|
<p>The implementation largely follows that of [boost]_.</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
<p><code><a href="#gammaincc">gammaincc</a></code> has experimental support for Python Array API Standard compatible
|
<p><code><a href="#gammaincc">gammaincc</a></code> has experimental support for Python Array API Standard compatible
|
||||||
backends in addition to NumPy. Please consider testing these features
|
backends in addition to NumPy. Please consider testing these features
|
||||||
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
|
@ -1406,7 +1502,8 @@ JAX ✅ ✅<br />
|
||||||
Dask ✅ n/a<br />
|
Dask ✅ n/a<br />
|
||||||
==================== ==================== ====================</p>
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
<p>See :ref:<code>dev-arrayapi</code> for more information.</p>
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
|
|
@ -1475,9 +1572,7 @@ starts at 1 and monotonically decreases to 0.</p>
|
||||||
</span></pre></div>
|
</span></pre></div>
|
||||||
|
|
||||||
|
|
||||||
<div class="docstring"><p>gammasgn(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature])</p>
|
<div class="docstring"><p>gammasgn(x, out=None)</p>
|
||||||
|
|
||||||
<p>gammasgn(x, out=None)</p>
|
|
||||||
|
|
||||||
<p>Sign of the gamma function.</p>
|
<p>Sign of the gamma function.</p>
|
||||||
|
|
||||||
|
|
@ -1510,15 +1605,39 @@ Optional output array for the function values</li>
|
||||||
|
|
||||||
<h6 id="see-also">See Also</h6>
|
<h6 id="see-also">See Also</h6>
|
||||||
|
|
||||||
<p><code><a href="#gamma">gamma</a></code>: the gamma function<br />
|
<p><code>gamma()`
|
||||||
<code><a href="#gammaln">gammaln</a></code>: log of the absolute value of the gamma function<br />
|
the`, `gamma`, `function`
|
||||||
<code>loggamma</code>: analytic continuation of the log of the gamma function </p>
|
</code>gammaln()<code>
|
||||||
|
log</code>, <code>of</code>, <code>the</code>, <code>absolute</code>, <code>value</code>, <code>of</code>, <code>the</code>, <code><a href="#gamma">gamma</a></code>, <code>function</code><br />
|
||||||
|
`<code>loggamma()</code>
|
||||||
|
analytic<code>,</code>continuation<code>,</code>of<code>,</code>the<code>,</code>log<code>,</code>of<code>,</code>the<code>,</code>gamma<code>,</code>function` </p>
|
||||||
|
|
||||||
<h6 id="notes">Notes</h6>
|
<h6 id="notes">Notes</h6>
|
||||||
|
|
||||||
<p>The gamma function can be computed as <code>gammasgn(x) *
|
<p>The gamma function can be computed as <code>gammasgn(x) *
|
||||||
np.exp(gammaln(x))</code>.</p>
|
np.exp(gammaln(x))</code>.</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
|
<p><code><a href="#gammasgn">gammasgn</a></code> has experimental support for Python Array API Standard compatible
|
||||||
|
backends in addition to NumPy. Please consider testing these features
|
||||||
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following
|
||||||
|
combinations of backend and device (or other capability) are supported.</p>
|
||||||
|
|
||||||
|
<p>==================== ==================== ====================
|
||||||
|
Library CPU GPU
|
||||||
|
==================== ==================== ====================
|
||||||
|
NumPy ✅ n/a<br />
|
||||||
|
CuPy n/a ✅<br />
|
||||||
|
PyTorch ✅ ⛔<br />
|
||||||
|
JAX ✅ ✅<br />
|
||||||
|
Dask ✅ n/a<br />
|
||||||
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
<p>.. [dlmf] NIST Digital Library of Mathematical Functions
|
<p>.. [dlmf] NIST Digital Library of Mathematical Functions
|
||||||
|
|
@ -1591,9 +1710,7 @@ np.exp(gammaln(x))</code>.</p>
|
||||||
</span></pre></div>
|
</span></pre></div>
|
||||||
|
|
||||||
|
|
||||||
<div class="docstring"><p>rgamma(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature])</p>
|
<div class="docstring"><p>rgamma(z, out=None)</p>
|
||||||
|
|
||||||
<p>rgamma(z, out=None)</p>
|
|
||||||
|
|
||||||
<p>Reciprocal of the gamma function.</p>
|
<p>Reciprocal of the gamma function.</p>
|
||||||
|
|
||||||
|
|
@ -1617,7 +1734,8 @@ Optional output array for the function results</li>
|
||||||
|
|
||||||
<h6 id="see-also">See Also</h6>
|
<h6 id="see-also">See Also</h6>
|
||||||
|
|
||||||
<p><code>gamma,</code>, <code>gammaln,</code>, <code>loggamma</code> </p>
|
<p><code>gamma()`,`,</code>gammaln()<code>,</code>, `<code>loggamma()</code>
|
||||||
|
..` </p>
|
||||||
|
|
||||||
<h6 id="notes">Notes</h6>
|
<h6 id="notes">Notes</h6>
|
||||||
|
|
||||||
|
|
@ -1626,6 +1744,27 @@ nonpositive integers, so <code><a href="#rgamma">rgamma</a></code> is an entire
|
||||||
at the nonpositive integers. See the discussion in [dlmf]_ for
|
at the nonpositive integers. See the discussion in [dlmf]_ for
|
||||||
more details.</p>
|
more details.</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
|
<p><code><a href="#rgamma">rgamma</a></code> has experimental support for Python Array API Standard compatible
|
||||||
|
backends in addition to NumPy. Please consider testing these features
|
||||||
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following
|
||||||
|
combinations of backend and device (or other capability) are supported.</p>
|
||||||
|
|
||||||
|
<p>==================== ==================== ====================
|
||||||
|
Library CPU GPU
|
||||||
|
==================== ==================== ====================
|
||||||
|
NumPy ✅ n/a<br />
|
||||||
|
CuPy n/a ✅<br />
|
||||||
|
PyTorch ✅ ⛔<br />
|
||||||
|
JAX ⚠️ no JIT ⛔<br />
|
||||||
|
Dask ✅ n/a<br />
|
||||||
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
<p>.. [dlmf] Nist, Digital Library of Mathematical functions,
|
<p>.. [dlmf] Nist, Digital Library of Mathematical functions,
|
||||||
|
|
@ -1731,6 +1870,27 @@ function is defined over a subset of the real set).</p>
|
||||||
|
|
||||||
<p>$$\Gamma_d(a) = \pi^{d(d-1)/4} \prod_{i=1}^{d} \Gamma(a - (i-1)/2).$$</p>
|
<p>$$\Gamma_d(a) = \pi^{d(d-1)/4} \prod_{i=1}^{d} \Gamma(a - (i-1)/2).$$</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
|
<p><code><a href="#multigammaln">multigammaln</a></code> has experimental support for Python Array API Standard compatible
|
||||||
|
backends in addition to NumPy. Please consider testing these features
|
||||||
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following
|
||||||
|
combinations of backend and device (or other capability) are supported.</p>
|
||||||
|
|
||||||
|
<p>==================== ==================== ====================
|
||||||
|
Library CPU GPU
|
||||||
|
==================== ==================== ====================
|
||||||
|
NumPy ✅ n/a<br />
|
||||||
|
CuPy n/a ✅<br />
|
||||||
|
PyTorch ✅ ✅<br />
|
||||||
|
JAX ✅ ✅<br />
|
||||||
|
Dask ✅ n/a<br />
|
||||||
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
<p>R. J. Muirhead, Aspects of multivariate statistical theory (Wiley Series in
|
<p>R. J. Muirhead, Aspects of multivariate statistical theory (Wiley Series in
|
||||||
|
|
@ -1823,9 +1983,7 @@ shown above:</p>
|
||||||
</span></pre></div>
|
</span></pre></div>
|
||||||
|
|
||||||
|
|
||||||
<div class="docstring"><p>j0(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature])</p>
|
<div class="docstring"><p>j0(x, out=None)</p>
|
||||||
|
|
||||||
<p>j0(x, out=None)</p>
|
|
||||||
|
|
||||||
<p>Bessel function of the first kind of order 0.</p>
|
<p>Bessel function of the first kind of order 0.</p>
|
||||||
|
|
||||||
|
|
@ -1847,8 +2005,10 @@ Value of the Bessel function of the first kind of order 0 at <code>x</code>.</li
|
||||||
|
|
||||||
<h6 id="see-also">See Also</h6>
|
<h6 id="see-also">See Also</h6>
|
||||||
|
|
||||||
<p><code>jv</code>: Bessel function of real order and complex argument.<br />
|
<p><code>jv()`
|
||||||
<code>spherical_jn</code>: spherical Bessel functions. </p>
|
Bessel`, `function`, `of`, `real`, `order`, `and`, `complex`, `argument.`
|
||||||
|
</code>spherical_jn()<code>
|
||||||
|
spherical</code>, <code>Bessel</code>, <code>functions.</code> </p>
|
||||||
|
|
||||||
<h6 id="notes">Notes</h6>
|
<h6 id="notes">Notes</h6>
|
||||||
|
|
||||||
|
|
@ -1868,6 +2028,27 @@ two rational functions of degree 6/6 and 7/7.</p>
|
||||||
It should not be confused with the spherical Bessel functions (see
|
It should not be confused with the spherical Bessel functions (see
|
||||||
<code>spherical_jn</code>).</p>
|
<code>spherical_jn</code>).</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
|
<p><code><a href="#j0">j0</a></code> has experimental support for Python Array API Standard compatible
|
||||||
|
backends in addition to NumPy. Please consider testing these features
|
||||||
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following
|
||||||
|
combinations of backend and device (or other capability) are supported.</p>
|
||||||
|
|
||||||
|
<p>==================== ==================== ====================
|
||||||
|
Library CPU GPU
|
||||||
|
==================== ==================== ====================
|
||||||
|
NumPy ✅ n/a<br />
|
||||||
|
CuPy n/a ✅<br />
|
||||||
|
PyTorch ✅ ✅<br />
|
||||||
|
JAX ⚠️ no JIT ⛔<br />
|
||||||
|
Dask ✅ n/a<br />
|
||||||
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
<h6 id="examples">Examples</h6>
|
<h6 id="examples">Examples</h6>
|
||||||
|
|
@ -1944,9 +2125,7 @@ It should not be confused with the spherical Bessel functions (see
|
||||||
</span></pre></div>
|
</span></pre></div>
|
||||||
|
|
||||||
|
|
||||||
<div class="docstring"><p>y0(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature])</p>
|
<div class="docstring"><p>y0(x, out=None)</p>
|
||||||
|
|
||||||
<p>y0(x, out=None)</p>
|
|
||||||
|
|
||||||
<p>Bessel function of the second kind of order 0.</p>
|
<p>Bessel function of the second kind of order 0.</p>
|
||||||
|
|
||||||
|
|
@ -1968,8 +2147,10 @@ Value of the Bessel function of the second kind of order 0 at <code>x</code>.</l
|
||||||
|
|
||||||
<h6 id="see-also">See Also</h6>
|
<h6 id="see-also">See Also</h6>
|
||||||
|
|
||||||
<p><code><a href="#j0">j0</a></code>: Bessel function of the first kind of order 0<br />
|
<p><code>j0()`
|
||||||
<code>yv</code>: Bessel function of the first kind </p>
|
Bessel`, `function`, `of`, `the`, `first`, `kind`, `of`, `order`, `0`
|
||||||
|
</code>yv()<code>
|
||||||
|
Bessel</code>, <code>function</code>, <code>of</code>, <code>the</code>, <code>first</code>, <code>kind</code> </p>
|
||||||
|
|
||||||
<h6 id="notes">Notes</h6>
|
<h6 id="notes">Notes</h6>
|
||||||
|
|
||||||
|
|
@ -1986,6 +2167,27 @@ two rational functions of degree 6/6 and 7/7.</p>
|
||||||
|
|
||||||
<p>This function is a wrapper for the Cephes <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup> routine <code><a href="#y0">y0</a></code>.</p>
|
<p>This function is a wrapper for the Cephes <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup> routine <code><a href="#y0">y0</a></code>.</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
|
<p><code><a href="#y0">y0</a></code> has experimental support for Python Array API Standard compatible
|
||||||
|
backends in addition to NumPy. Please consider testing these features
|
||||||
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following
|
||||||
|
combinations of backend and device (or other capability) are supported.</p>
|
||||||
|
|
||||||
|
<p>==================== ==================== ====================
|
||||||
|
Library CPU GPU
|
||||||
|
==================== ==================== ====================
|
||||||
|
NumPy ✅ n/a<br />
|
||||||
|
CuPy n/a ✅<br />
|
||||||
|
PyTorch ✅ ✅<br />
|
||||||
|
JAX ⚠️ no JIT ⛔<br />
|
||||||
|
Dask ✅ n/a<br />
|
||||||
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
<h6 id="examples">Examples</h6>
|
<h6 id="examples">Examples</h6>
|
||||||
|
|
@ -2062,9 +2264,7 @@ two rational functions of degree 6/6 and 7/7.</p>
|
||||||
</span></pre></div>
|
</span></pre></div>
|
||||||
|
|
||||||
|
|
||||||
<div class="docstring"><p>j1(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature])</p>
|
<div class="docstring"><p>j1(x, out=None)</p>
|
||||||
|
|
||||||
<p>j1(x, out=None)</p>
|
|
||||||
|
|
||||||
<p>Bessel function of the first kind of order 1.</p>
|
<p>Bessel function of the first kind of order 1.</p>
|
||||||
|
|
||||||
|
|
@ -2086,8 +2286,10 @@ Value of the Bessel function of the first kind of order 1 at <code>x</code>.</li
|
||||||
|
|
||||||
<h6 id="see-also">See Also</h6>
|
<h6 id="see-also">See Also</h6>
|
||||||
|
|
||||||
<p><code>jv</code>: Bessel function of the first kind<br />
|
<p><code>jv()`
|
||||||
<code>spherical_jn</code>: spherical Bessel functions. </p>
|
Bessel`, `function`, `of`, `the`, `first`, `kind`
|
||||||
|
</code>spherical_jn()<code>
|
||||||
|
spherical</code>, <code>Bessel</code>, <code>functions.</code> </p>
|
||||||
|
|
||||||
<h6 id="notes">Notes</h6>
|
<h6 id="notes">Notes</h6>
|
||||||
|
|
||||||
|
|
@ -2100,6 +2302,27 @@ functions of degree 5/5.</p>
|
||||||
It should not be confused with the spherical Bessel functions (see
|
It should not be confused with the spherical Bessel functions (see
|
||||||
<code>spherical_jn</code>).</p>
|
<code>spherical_jn</code>).</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
|
<p><code><a href="#j1">j1</a></code> has experimental support for Python Array API Standard compatible
|
||||||
|
backends in addition to NumPy. Please consider testing these features
|
||||||
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following
|
||||||
|
combinations of backend and device (or other capability) are supported.</p>
|
||||||
|
|
||||||
|
<p>==================== ==================== ====================
|
||||||
|
Library CPU GPU
|
||||||
|
==================== ==================== ====================
|
||||||
|
NumPy ✅ n/a<br />
|
||||||
|
CuPy n/a ✅<br />
|
||||||
|
PyTorch ✅ ✅<br />
|
||||||
|
JAX ⚠️ no JIT ⛔<br />
|
||||||
|
Dask ✅ n/a<br />
|
||||||
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
<h6 id="examples">Examples</h6>
|
<h6 id="examples">Examples</h6>
|
||||||
|
|
@ -2176,9 +2399,7 @@ It should not be confused with the spherical Bessel functions (see
|
||||||
</span></pre></div>
|
</span></pre></div>
|
||||||
|
|
||||||
|
|
||||||
<div class="docstring"><p>y1(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature])</p>
|
<div class="docstring"><p>y1(x, out=None)</p>
|
||||||
|
|
||||||
<p>y1(x, out=None)</p>
|
|
||||||
|
|
||||||
<p>Bessel function of the second kind of order 1.</p>
|
<p>Bessel function of the second kind of order 1.</p>
|
||||||
|
|
||||||
|
|
@ -2200,9 +2421,12 @@ Value of the Bessel function of the second kind of order 1 at <code>x</code>.</l
|
||||||
|
|
||||||
<h6 id="see-also">See Also</h6>
|
<h6 id="see-also">See Also</h6>
|
||||||
|
|
||||||
<p><code><a href="#j1">j1</a></code>: Bessel function of the first kind of order 1<br />
|
<p><code>j1()`
|
||||||
<code><a href="#yn">yn</a></code>: Bessel function of the second kind<br />
|
Bessel`, `function`, `of`, `the`, `first`, `kind`, `of`, `order`, `1`
|
||||||
<code>yv</code>: Bessel function of the second kind </p>
|
</code>yn()<code>
|
||||||
|
Bessel</code>, <code>function</code>, <code>of</code>, <code>the</code>, <code>second</code>, <code>kind</code><br />
|
||||||
|
`<code>yv()</code>
|
||||||
|
Bessel<code>,</code>function<code>,</code>of<code>,</code>the<code>,</code>second<code>,</code>kind` </p>
|
||||||
|
|
||||||
<h6 id="notes">Notes</h6>
|
<h6 id="notes">Notes</h6>
|
||||||
|
|
||||||
|
|
@ -2214,6 +2438,27 @@ rational functions of degree 5/5.</p>
|
||||||
|
|
||||||
<p>This function is a wrapper for the Cephes <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup> routine <code><a href="#y1">y1</a></code>.</p>
|
<p>This function is a wrapper for the Cephes <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup> routine <code><a href="#y1">y1</a></code>.</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
|
<p><code><a href="#y1">y1</a></code> has experimental support for Python Array API Standard compatible
|
||||||
|
backends in addition to NumPy. Please consider testing these features
|
||||||
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following
|
||||||
|
combinations of backend and device (or other capability) are supported.</p>
|
||||||
|
|
||||||
|
<p>==================== ==================== ====================
|
||||||
|
Library CPU GPU
|
||||||
|
==================== ==================== ====================
|
||||||
|
NumPy ✅ n/a<br />
|
||||||
|
CuPy n/a ✅<br />
|
||||||
|
PyTorch ✅ ✅<br />
|
||||||
|
JAX ⚠️ no JIT ⛔<br />
|
||||||
|
Dask ✅ n/a<br />
|
||||||
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
<h6 id="examples">Examples</h6>
|
<h6 id="examples">Examples</h6>
|
||||||
|
|
@ -2385,7 +2630,7 @@ array for <code>z</code>.</p>
|
||||||
|
|
||||||
<p>If <code>z</code> is an array, the order parameter <code>v</code> must be broadcastable to
|
<p>If <code>z</code> is an array, the order parameter <code>v</code> must be broadcastable to
|
||||||
the correct shape if different orders shall be computed in one call.
|
the correct shape if different orders shall be computed in one call.
|
||||||
To calculate the orders 0 and 1 for an 1D array:</p>
|
To calculate the orders 0 and 1 for a 1D array:</p>
|
||||||
|
|
||||||
<div class="pdoc-code codehilite">
|
<div class="pdoc-code codehilite">
|
||||||
<pre><span></span><code><span class="gp">>>> </span><span class="n">orders</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">1</span><span class="p">]])</span>
|
<pre><span></span><code><span class="gp">>>> </span><span class="n">orders</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">1</span><span class="p">]])</span>
|
||||||
|
|
@ -2457,9 +2702,7 @@ of a Complex Argument and Nonnegative Order",
|
||||||
</span></pre></div>
|
</span></pre></div>
|
||||||
|
|
||||||
|
|
||||||
<div class="docstring"><p>yn(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature])</p>
|
<div class="docstring"><p>yn(n, x, out=None)</p>
|
||||||
|
|
||||||
<p>yn(n, x, out=None)</p>
|
|
||||||
|
|
||||||
<p>Bessel function of the second kind of integer order and real argument.</p>
|
<p>Bessel function of the second kind of integer order and real argument.</p>
|
||||||
|
|
||||||
|
|
@ -2483,9 +2726,12 @@ Value of the Bessel function, \( Y_n(x) \).</li>
|
||||||
|
|
||||||
<h6 id="see-also">See Also</h6>
|
<h6 id="see-also">See Also</h6>
|
||||||
|
|
||||||
<p><code>yv</code>: For real order and real or complex argument.<br />
|
<p><code>yv()`
|
||||||
<code><a href="#y0">y0</a></code>: faster implementation of this function for order 0<br />
|
For`, `real`, `order`, `and`, `real`, `or`, `complex`, `argument.`
|
||||||
<code><a href="#y1">y1</a></code>: faster implementation of this function for order 1 </p>
|
</code>y0()<code>
|
||||||
|
faster</code>, <code>implementation</code>, <code>of</code>, <code>this</code>, <code>function</code>, <code>for</code>, <code>order</code>, <code>0</code><br />
|
||||||
|
`<code><a href="#y1">y1()</a></code>
|
||||||
|
faster<code>,</code>implementation<code>,</code>of<code>,</code>this<code>,</code>function<code>,</code>for<code>,</code>order<code>,</code>1` </p>
|
||||||
|
|
||||||
<h6 id="notes">Notes</h6>
|
<h6 id="notes">Notes</h6>
|
||||||
|
|
||||||
|
|
@ -2495,6 +2741,27 @@ Value of the Bessel function, \( Y_n(x) \).</li>
|
||||||
values computed by the Cephes routines <code><a href="#y0">y0</a></code> and <code><a href="#y1">y1</a></code>. If <code>n = 0</code> or 1,
|
values computed by the Cephes routines <code><a href="#y0">y0</a></code> and <code><a href="#y1">y1</a></code>. If <code>n = 0</code> or 1,
|
||||||
the routine for <code><a href="#y0">y0</a></code> or <code><a href="#y1">y1</a></code> is called directly.</p>
|
the routine for <code><a href="#y0">y0</a></code> or <code><a href="#y1">y1</a></code> is called directly.</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
|
<p><code><a href="#yn">yn</a></code> has experimental support for Python Array API Standard compatible
|
||||||
|
backends in addition to NumPy. Please consider testing these features
|
||||||
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following
|
||||||
|
combinations of backend and device (or other capability) are supported.</p>
|
||||||
|
|
||||||
|
<p>==================== ==================== ====================
|
||||||
|
Library CPU GPU
|
||||||
|
==================== ==================== ====================
|
||||||
|
NumPy ✅ n/a<br />
|
||||||
|
CuPy n/a ✅<br />
|
||||||
|
PyTorch ✅ ⛔<br />
|
||||||
|
JAX ⚠️ no JIT ⛔<br />
|
||||||
|
Dask ✅ n/a<br />
|
||||||
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
<h6 id="examples">Examples</h6>
|
<h6 id="examples">Examples</h6>
|
||||||
|
|
@ -2538,7 +2805,7 @@ array for <code>z</code>.</p>
|
||||||
|
|
||||||
<p>If <code>z</code> is an array, the order parameter <code>v</code> must be broadcastable to
|
<p>If <code>z</code> is an array, the order parameter <code>v</code> must be broadcastable to
|
||||||
the correct shape if different orders shall be computed in one call.
|
the correct shape if different orders shall be computed in one call.
|
||||||
To calculate the orders 0 and 1 for an 1D array:</p>
|
To calculate the orders 0 and 1 for a 1D array:</p>
|
||||||
|
|
||||||
<div class="pdoc-code codehilite">
|
<div class="pdoc-code codehilite">
|
||||||
<pre><span></span><code><span class="gp">>>> </span><span class="n">orders</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">1</span><span class="p">]])</span>
|
<pre><span></span><code><span class="gp">>>> </span><span class="n">orders</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">1</span><span class="p">]])</span>
|
||||||
|
|
@ -2650,6 +2917,8 @@ Chebyshev polynomial expansions are employed in each interval.</p>
|
||||||
|
|
||||||
<p>This function is a wrapper for the Cephes <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup> routine <code><a href="#i0">i0</a></code>.</p>
|
<p>This function is a wrapper for the Cephes <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup> routine <code><a href="#i0">i0</a></code>.</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
<p><code><a href="#i0">i0</a></code> has experimental support for Python Array API Standard compatible
|
<p><code><a href="#i0">i0</a></code> has experimental support for Python Array API Standard compatible
|
||||||
backends in addition to NumPy. Please consider testing these features
|
backends in addition to NumPy. Please consider testing these features
|
||||||
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
|
@ -2666,7 +2935,8 @@ JAX ✅ ✅<br />
|
||||||
Dask ✅ n/a<br />
|
Dask ✅ n/a<br />
|
||||||
==================== ==================== ====================</p>
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
<p>See :ref:<code>dev-arrayapi</code> for more information.</p>
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
|
|
@ -2785,6 +3055,8 @@ Chebyshev polynomial expansions are employed in each interval.</p>
|
||||||
|
|
||||||
<p>This function is a wrapper for the Cephes <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup> routine <code><a href="#i1">i1</a></code>.</p>
|
<p>This function is a wrapper for the Cephes <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup> routine <code><a href="#i1">i1</a></code>.</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
<p><code><a href="#i1">i1</a></code> has experimental support for Python Array API Standard compatible
|
<p><code><a href="#i1">i1</a></code> has experimental support for Python Array API Standard compatible
|
||||||
backends in addition to NumPy. Please consider testing these features
|
backends in addition to NumPy. Please consider testing these features
|
||||||
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
|
@ -2801,7 +3073,8 @@ JAX ✅ ✅<br />
|
||||||
Dask ✅ n/a<br />
|
Dask ✅ n/a<br />
|
||||||
==================== ==================== ====================</p>
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
<p>See :ref:<code>dev-arrayapi</code> for more information.</p>
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
|
|
@ -2979,7 +3252,7 @@ array for <code>z</code>.</p>
|
||||||
|
|
||||||
<p>If <code>z</code> is an array, the order parameter <code>v</code> must be broadcastable to
|
<p>If <code>z</code> is an array, the order parameter <code>v</code> must be broadcastable to
|
||||||
the correct shape if different orders shall be computed in one call.
|
the correct shape if different orders shall be computed in one call.
|
||||||
To calculate the orders 0 and 1 for an 1D array:</p>
|
To calculate the orders 0 and 1 for a 1D array:</p>
|
||||||
|
|
||||||
<div class="pdoc-code codehilite">
|
<div class="pdoc-code codehilite">
|
||||||
<pre><span></span><code><span class="gp">>>> </span><span class="n">orders</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">1</span><span class="p">]])</span>
|
<pre><span></span><code><span class="gp">>>> </span><span class="n">orders</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([[</span><span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mi">1</span><span class="p">]])</span>
|
||||||
|
|
@ -3254,6 +3527,8 @@ The values of the error function at the given points <code>x</code>.</li>
|
||||||
<p>The cumulative of the unit normal distribution is given by
|
<p>The cumulative of the unit normal distribution is given by
|
||||||
<code>Phi(z) = 1/2[1 + erf(z/sqrt(2))]</code>.</p>
|
<code>Phi(z) = 1/2[1 + erf(z/sqrt(2))]</code>.</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
<p><code><a href="#erf">erf</a></code> has experimental support for Python Array API Standard compatible
|
<p><code><a href="#erf">erf</a></code> has experimental support for Python Array API Standard compatible
|
||||||
backends in addition to NumPy. Please consider testing these features
|
backends in addition to NumPy. Please consider testing these features
|
||||||
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
|
@ -3270,7 +3545,8 @@ JAX ✅ ✅<br />
|
||||||
Dask ✅ n/a<br />
|
Dask ✅ n/a<br />
|
||||||
==================== ==================== ====================</p>
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
<p>See :ref:<code>dev-arrayapi</code> for more information.</p>
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
|
|
@ -3352,6 +3628,8 @@ Optional output array for the function results</li>
|
||||||
|
|
||||||
<h6 id="notes">Notes</h6>
|
<h6 id="notes">Notes</h6>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
<p><code><a href="#erfc">erfc</a></code> has experimental support for Python Array API Standard compatible
|
<p><code><a href="#erfc">erfc</a></code> has experimental support for Python Array API Standard compatible
|
||||||
backends in addition to NumPy. Please consider testing these features
|
backends in addition to NumPy. Please consider testing these features
|
||||||
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
|
@ -3368,7 +3646,8 @@ JAX ✅ ✅<br />
|
||||||
Dask ✅ n/a<br />
|
Dask ✅ n/a<br />
|
||||||
==================== ==================== ====================</p>
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
<p>See :ref:<code>dev-arrayapi</code> for more information.</p>
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
|
|
@ -3424,9 +3703,7 @@ Dask ✅ n/a<br />
|
||||||
</span></pre></div>
|
</span></pre></div>
|
||||||
|
|
||||||
|
|
||||||
<div class="docstring"><p>erfinv(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature])</p>
|
<div class="docstring"><p>erfinv(y, out=None)</p>
|
||||||
|
|
||||||
<p>erfinv(y, out=None)</p>
|
|
||||||
|
|
||||||
<p>Inverse of the error function.</p>
|
<p>Inverse of the error function.</p>
|
||||||
|
|
||||||
|
|
@ -3455,15 +3732,39 @@ The inverse of erf of y, element-wise</li>
|
||||||
|
|
||||||
<h6 id="see-also">See Also</h6>
|
<h6 id="see-also">See Also</h6>
|
||||||
|
|
||||||
<p><code><a href="#erf">erf</a></code>: Error function of a complex argument<br />
|
<p><code>erf()`
|
||||||
<code><a href="#erfc">erfc</a></code>: Complementary error function, <code>1 - erf(x)</code><br />
|
Error`, `function`, `of`, `a`, `complex`, `argument`
|
||||||
<code><a href="#erfcinv">erfcinv</a></code>: Inverse of the complementary error function </p>
|
</code>erfc()<code>
|
||||||
|
Complementary</code>, <code>error</code>, <code>function,</code>, <code>1`, `-`, `erf(x)</code><br />
|
||||||
|
`<code><a href="#erfcinv">erfcinv()</a></code>
|
||||||
|
Inverse<code>,</code>of<code>,</code>the<code>,</code>complementary<code>,</code>error<code>,</code>function` </p>
|
||||||
|
|
||||||
<h6 id="notes">Notes</h6>
|
<h6 id="notes">Notes</h6>
|
||||||
|
|
||||||
<p>This function wraps the <code>erf_inv</code> routine from the
|
<p>This function wraps the <code>erf_inv</code> routine from the
|
||||||
Boost Math C++ library <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup>.</p>
|
Boost Math C++ library <sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup>.</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
|
<p><code><a href="#erfinv">erfinv</a></code> has experimental support for Python Array API Standard compatible
|
||||||
|
backends in addition to NumPy. Please consider testing these features
|
||||||
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following
|
||||||
|
combinations of backend and device (or other capability) are supported.</p>
|
||||||
|
|
||||||
|
<p>==================== ==================== ====================
|
||||||
|
Library CPU GPU
|
||||||
|
==================== ==================== ====================
|
||||||
|
NumPy ✅ n/a<br />
|
||||||
|
CuPy n/a ✅<br />
|
||||||
|
PyTorch ✅ ✅<br />
|
||||||
|
JAX ✅ ✅<br />
|
||||||
|
Dask ✅ n/a<br />
|
||||||
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="references">References</h6>
|
<h6 id="references">References</h6>
|
||||||
|
|
||||||
<h6 id="examples">Examples</h6>
|
<h6 id="examples">Examples</h6>
|
||||||
|
|
@ -3695,6 +3996,8 @@ see <a href="https://docs.scipy.org/doc/numpy/reference/ufuncs.html">ufuncs </a>
|
||||||
|
|
||||||
<p><em>New in version 0.10.0.</em></p>
|
<p><em>New in version 0.10.0.</em></p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
<p><code><a href="#logit">logit</a></code> has experimental support for Python Array API Standard compatible
|
<p><code><a href="#logit">logit</a></code> has experimental support for Python Array API Standard compatible
|
||||||
backends in addition to NumPy. Please consider testing these features
|
backends in addition to NumPy. Please consider testing these features
|
||||||
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
|
@ -3711,7 +4014,8 @@ JAX ✅ ✅<br />
|
||||||
Dask ✅ n/a<br />
|
Dask ✅ n/a<br />
|
||||||
==================== ==================== ====================</p>
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
<p>See :ref:<code>dev-arrayapi</code> for more information.</p>
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="examples">Examples</h6>
|
<h6 id="examples">Examples</h6>
|
||||||
|
|
||||||
|
|
@ -3819,6 +4123,8 @@ see <a href="https://docs.scipy.org/doc/numpy/reference/ufuncs.html">ufuncs </a>
|
||||||
|
|
||||||
<p><em>New in version 0.10.0.</em></p>
|
<p><em>New in version 0.10.0.</em></p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
<p><code><a href="#expit">expit</a></code> has experimental support for Python Array API Standard compatible
|
<p><code><a href="#expit">expit</a></code> has experimental support for Python Array API Standard compatible
|
||||||
backends in addition to NumPy. Please consider testing these features
|
backends in addition to NumPy. Please consider testing these features
|
||||||
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
|
@ -3835,7 +4141,8 @@ JAX ✅ ✅<br />
|
||||||
Dask ✅ n/a<br />
|
Dask ✅ n/a<br />
|
||||||
==================== ==================== ====================</p>
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
<p>See :ref:<code>dev-arrayapi</code> for more information.</p>
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="examples">Examples</h6>
|
<h6 id="examples">Examples</h6>
|
||||||
|
|
||||||
|
|
@ -3971,6 +4278,8 @@ function, but may be less stable.</p>
|
||||||
infinite number of \( z \) such that \( exp(z) = x \). The convention
|
infinite number of \( z \) such that \( exp(z) = x \). The convention
|
||||||
is to return the \( z \) whose imaginary part lies in \( (-pi, pi] \).</p>
|
is to return the \( z \) whose imaginary part lies in \( (-pi, pi] \).</p>
|
||||||
|
|
||||||
|
<p><strong>Array API Standard Support</strong></p>
|
||||||
|
|
||||||
<p><code><a href="#logsumexp">logsumexp</a></code> has experimental support for Python Array API Standard compatible
|
<p><code><a href="#logsumexp">logsumexp</a></code> has experimental support for Python Array API Standard compatible
|
||||||
backends in addition to NumPy. Please consider testing these features
|
backends in addition to NumPy. Please consider testing these features
|
||||||
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
by setting an environment variable <code>SCIPY_ARRAY_API=1</code> and providing
|
||||||
|
|
@ -3987,7 +4296,8 @@ JAX ✅ ✅<br />
|
||||||
Dask ✅ n/a<br />
|
Dask ✅ n/a<br />
|
||||||
==================== ==================== ====================</p>
|
==================== ==================== ====================</p>
|
||||||
|
|
||||||
<p>See :ref:<code>dev-arrayapi</code> for more information.</p>
|
<pre><code>See :ref:`dev-arrayapi` for more information.
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<h6 id="examples">Examples</h6>
|
<h6 id="examples">Examples</h6>
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue