Skip to content

Commit

Permalink
Deploying to gh-pages from @ 4e3bdf0 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
github-merge-queue[bot] committed May 1, 2024
1 parent c44e3d4 commit 0982c35
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 7 deletions.
5 changes: 5 additions & 0 deletions _modules/arkouda/array_api/_array_object.html
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ <h1>Source code for arkouda.array_api._array_object</h1><div class="highlight"><
<span class="n">_result_type</span><span class="p">,</span>
<span class="n">_dtype_categories</span><span class="p">,</span>
<span class="p">)</span>
<span class="kn">from</span> <span class="nn">._creation_functions</span> <span class="kn">import</span> <span class="n">asarray</span>

<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">TYPE_CHECKING</span><span class="p">,</span> <span class="n">Optional</span><span class="p">,</span> <span class="n">Tuple</span><span class="p">,</span> <span class="n">Union</span><span class="p">,</span> <span class="n">Any</span><span class="p">,</span> <span class="n">Dict</span><span class="p">,</span> <span class="n">Callable</span>
<span class="kn">import</span> <span class="nn">types</span>
Expand Down Expand Up @@ -691,6 +692,8 @@ <h1>Source code for arkouda.array_api._array_object</h1><div class="highlight"><
<span class="n">k</span> <span class="o">=</span> <span class="n">key</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="k">else</span><span class="p">:</span>
<span class="n">k</span> <span class="o">=</span> <span class="n">key</span><span class="o">.</span><span class="n">_array</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">key</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="n">k</span> <span class="o">=</span> <span class="n">asarray</span><span class="p">(</span><span class="n">key</span><span class="p">)</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">):</span>
<span class="n">k</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">kt</span> <span class="ow">in</span> <span class="n">key</span><span class="p">:</span>
Expand All @@ -699,6 +702,8 @@ <h1>Source code for arkouda.array_api._array_object</h1><div class="highlight"><
<span class="n">k</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">kt</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="k">else</span> <span class="p">:</span>
<span class="n">k</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">kt</span><span class="o">.</span><span class="n">_array</span><span class="p">)</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">kt</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="n">k</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">asarray</span><span class="p">(</span><span class="n">kt</span><span class="p">)</span><span class="o">.</span><span class="n">_array</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">k</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">kt</span><span class="p">)</span>
<span class="n">k</span> <span class="o">=</span> <span class="nb">tuple</span><span class="p">(</span><span class="n">k</span><span class="p">)</span>
Expand Down
5 changes: 4 additions & 1 deletion _modules/arkouda/array_api/_creation_functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ <h1>Source code for arkouda.array_api._creation_functions</h1><div class="highli
<span class="nb">float</span><span class="p">,</span>
<span class="n">NestedSequence</span><span class="p">[</span><span class="nb">bool</span> <span class="o">|</span> <span class="nb">int</span> <span class="o">|</span> <span class="nb">float</span><span class="p">],</span>
<span class="n">SupportsBufferProtocol</span><span class="p">,</span>
<span class="n">ak</span><span class="o">.</span><span class="n">pdarray</span><span class="p">,</span>
<span class="p">],</span>
<span class="o">/</span><span class="p">,</span>
<span class="o">*</span><span class="p">,</span>
Expand All @@ -350,7 +351,9 @@ <h1>Source code for arkouda.array_api._creation_functions</h1><div class="highli
<span class="k">if</span> <span class="n">device</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">&quot;cpu&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">]:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Unsupported device </span><span class="si">{</span><span class="n">device</span><span class="si">!r}</span><span class="s2">&quot;</span><span class="p">)</span>

<span class="k">if</span> <span class="p">(</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="n">ak</span><span class="o">.</span><span class="n">pdarray</span><span class="p">):</span>
<span class="k">return</span> <span class="n">Array</span><span class="o">.</span><span class="n">_new</span><span class="p">(</span><span class="n">obj</span><span class="p">)</span>
<span class="k">elif</span> <span class="p">(</span>
<span class="nb">isinstance</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="nb">bool</span><span class="p">)</span>
<span class="ow">or</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="nb">int</span><span class="p">)</span>
<span class="ow">or</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="nb">float</span><span class="p">)</span>
Expand Down
4 changes: 3 additions & 1 deletion _modules/arkouda/array_api/_data_type_functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,9 @@ <h1>Source code for arkouda.array_api._data_type_functions</h1><div class="highl
<span class="k">for</span> <span class="n">a</span> <span class="ow">in</span> <span class="n">arrays_and_dtypes</span><span class="p">:</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">Array</span><span class="p">):</span>
<span class="n">a</span> <span class="o">=</span> <span class="n">a</span><span class="o">.</span><span class="n">dtype</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">a</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="ow">or</span> <span class="n">a</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">_all_dtypes</span><span class="p">:</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">a</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="n">a</span> <span class="o">=</span> <span class="n">a</span><span class="o">.</span><span class="n">dtype</span>
<span class="k">elif</span> <span class="n">a</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">_all_dtypes</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s2">&quot;result_type() inputs must be array_api arrays or dtypes&quot;</span><span class="p">)</span>
<span class="n">A</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">a</span><span class="p">)</span>

Expand Down
2 changes: 1 addition & 1 deletion _modules/arkouda/array_api/_elementwise_functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ <h1>Source code for arkouda.array_api._elementwise_functions</h1><div class="hig
<span class="s2">&quot;array&quot;</span><span class="p">:</span> <span class="n">x</span><span class="o">.</span><span class="n">_array</span><span class="p">,</span>
<span class="p">},</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">ak</span><span class="o">.</span><span class="n">create_pdarray</span><span class="p">(</span><span class="n">repMsg</span><span class="p">)</span></div>
<span class="k">return</span> <span class="n">Array</span><span class="o">.</span><span class="n">_new</span><span class="p">(</span><span class="n">ak</span><span class="o">.</span><span class="n">create_pdarray</span><span class="p">(</span><span class="n">repMsg</span><span class="p">))</span></div>



Expand Down
2 changes: 1 addition & 1 deletion _modules/arkouda/pdarrayclass.html
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ <h1>Source code for arkouda.pdarrayclass</h1><div class="highlight"><pre>
<span class="n">ret_key</span> <span class="o">=</span> <span class="n">key</span>

<span class="c1"># how many &#39;None&#39; arguments are in the key tuple</span>
<span class="n">num_none</span> <span class="o">=</span> <span class="n">ret_key</span><span class="o">.</span><span class="n">count</span><span class="p">(</span><span class="kc">None</span><span class="p">)</span>
<span class="n">num_none</span> <span class="o">=</span> <span class="n">reduce</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">:</span> <span class="n">x</span> <span class="o">+</span> <span class="p">(</span><span class="mi">1</span> <span class="k">if</span> <span class="n">y</span> <span class="ow">is</span> <span class="kc">None</span> <span class="k">else</span> <span class="mi">0</span><span class="p">),</span> <span class="n">ret_key</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>

<span class="c1"># replace &#39;...&#39; with the appropriate number of &#39;:&#39;</span>
<span class="n">elipsis_axis_idx</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Functions
.. py:function:: arange(start: Union[int, float], /, stop: Optional[Union[int, float]] = None, step: Union[int, float] = 1, *, dtype: Optional[arkouda.array_api._typing.Dtype] = None, device: Optional[arkouda.array_api._typing.Device] = None) -> arkouda.array_api._array_object.Array
.. py:function:: asarray(obj: Union[arkouda.array_api._array_object.Array, bool, int, float, arkouda.array_api._typing.NestedSequence[bool | int | float], arkouda.array_api._typing.SupportsBufferProtocol], /, *, dtype: Optional[arkouda.array_api._typing.Dtype] = None, device: Optional[arkouda.array_api._typing.Device] = None, copy: Optional[bool] = None) -> arkouda.array_api._array_object.Array
.. py:function:: asarray(obj: Union[arkouda.array_api._array_object.Array, bool, int, float, arkouda.array_api._typing.NestedSequence[bool | int | float], arkouda.array_api._typing.SupportsBufferProtocol, arkouda.pdarray], /, *, dtype: Optional[arkouda.array_api._typing.Dtype] = None, device: Optional[arkouda.array_api._typing.Device] = None, copy: Optional[bool] = None) -> arkouda.array_api._array_object.Array
.. py:function:: empty(shape: Union[int, Tuple[int, Ellipsis]], *, dtype: Optional[arkouda.array_api._typing.Dtype] = None, device: Optional[arkouda.array_api._typing.Device] = None) -> arkouda.array_api._array_object.Array
Expand Down
Loading

0 comments on commit 0982c35

Please sign in to comment.