Skip to content

Commit

Permalink
Deploying to gh-pages from @ 6cc6c01 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
github-merge-queue[bot] committed Mar 1, 2024
1 parent 72b291b commit 0cb5192
Show file tree
Hide file tree
Showing 8 changed files with 356 additions and 164 deletions.
62 changes: 59 additions & 3 deletions _modules/arkouda/pdarrayclass.html
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,9 @@ <h1>Source code for arkouda.pdarrayclass</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">arkouda.dtypes</span> <span class="kn">import</span> <span class="n">NUMBER_FORMAT_STRINGS</span><span class="p">,</span> <span class="n">DTypes</span><span class="p">,</span> <span class="n">bigint</span>
<span class="kn">from</span> <span class="nn">arkouda.dtypes</span> <span class="kn">import</span> <span class="nb">bool</span> <span class="k">as</span> <span class="n">akbool</span>
<span class="kn">from</span> <span class="nn">arkouda.dtypes</span> <span class="kn">import</span> <span class="nb">bool</span> <span class="k">as</span> <span class="n">npbool</span>
<span class="kn">from</span> <span class="nn">arkouda.dtypes</span> <span class="kn">import</span> <span class="n">dtype</span><span class="p">,</span> <span class="n">get_server_byteorder</span>
<span class="kn">from</span> <span class="nn">arkouda.dtypes</span> <span class="kn">import</span> <span class="n">dtype</span>
<span class="kn">from</span> <span class="nn">arkouda.dtypes</span> <span class="kn">import</span> <span class="n">float64</span> <span class="k">as</span> <span class="n">akfloat64</span>
<span class="kn">from</span> <span class="nn">arkouda.dtypes</span> <span class="kn">import</span> <span class="n">get_server_byteorder</span>
<span class="kn">from</span> <span class="nn">arkouda.dtypes</span> <span class="kn">import</span> <span class="n">int64</span> <span class="k">as</span> <span class="n">akint64</span>
<span class="kn">from</span> <span class="nn">arkouda.dtypes</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">int_scalars</span><span class="p">,</span>
Expand All @@ -313,7 +315,6 @@ <h1>Source code for arkouda.pdarrayclass</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">arkouda.dtypes</span> <span class="kn">import</span> <span class="n">str_</span> <span class="k">as</span> <span class="n">akstr_</span>
<span class="kn">from</span> <span class="nn">arkouda.dtypes</span> <span class="kn">import</span> <span class="n">translate_np_dtype</span>
<span class="kn">from</span> <span class="nn">arkouda.dtypes</span> <span class="kn">import</span> <span class="n">uint64</span> <span class="k">as</span> <span class="n">akuint64</span>
<span class="kn">from</span> <span class="nn">arkouda.dtypes</span> <span class="kn">import</span> <span class="n">float64</span> <span class="k">as</span> <span class="n">akfloat64</span>
<span class="kn">from</span> <span class="nn">arkouda.infoclass</span> <span class="kn">import</span> <span class="n">information</span><span class="p">,</span> <span class="n">pretty_print_information</span>
<span class="kn">from</span> <span class="nn">arkouda.logger</span> <span class="kn">import</span> <span class="n">getArkoudaLogger</span>

Expand All @@ -324,6 +325,7 @@ <h1>Source code for arkouda.pdarrayclass</h1><div class="highlight"><pre>
<span class="s2">&quot;all&quot;</span><span class="p">,</span>
<span class="s2">&quot;is_sorted&quot;</span><span class="p">,</span>
<span class="s2">&quot;sum&quot;</span><span class="p">,</span>
<span class="s2">&quot;dot&quot;</span><span class="p">,</span>
<span class="s2">&quot;prod&quot;</span><span class="p">,</span>
<span class="s2">&quot;min&quot;</span><span class="p">,</span>
<span class="s2">&quot;max&quot;</span><span class="p">,</span>
Expand Down Expand Up @@ -975,7 +977,7 @@ <h1>Source code for arkouda.pdarrayclass</h1><div class="highlight"><pre>
<span class="c1"># treat this as a single element slice</span>
<span class="c1"># TODO: implement rank-reducing slices</span>
<span class="n">starts</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="p">)</span>
<span class="n">stops</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span>
<span class="n">stops</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
<span class="n">strides</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">IndexError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Unhandled key type: </span><span class="si">{</span><span class="n">k</span><span class="si">}</span><span class="s2"> (</span><span class="si">{</span><span class="nb">type</span><span class="p">(</span><span class="n">k</span><span class="p">)</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">)</span>
Expand Down Expand Up @@ -2684,6 +2686,60 @@ <h1>Source code for arkouda.pdarrayclass</h1><div class="highlight"><pre>



<div class="viewcode-block" id="dot">
<a class="viewcode-back" href="../../autoapi/arkouda/pdarrayclass/index.html#arkouda.dot">[docs]</a>
<span class="nd">@typechecked</span>
<span class="k">def</span> <span class="nf">dot</span><span class="p">(</span>
<span class="n">pda1</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">int64</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">uint64</span><span class="p">,</span> <span class="n">pdarray</span><span class="p">],</span>
<span class="n">pda2</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">int64</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">uint64</span><span class="p">,</span> <span class="n">pdarray</span><span class="p">],</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">int64</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">uint64</span><span class="p">,</span> <span class="n">pdarray</span><span class="p">]:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Returns the sum of the elementwise product of two arrays of the same size (the dot product) or</span>
<span class="sd"> the product of a singleton element and an array.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> pda1 : Union[numeric_scalars, pdarray]</span>

<span class="sd"> pda2 : Union[numeric_scalars, pdarray]</span>


<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> Union[numeric_scalars, pdarray]</span>
<span class="sd"> The sum of the elementwise product pda1 and pda2 or</span>
<span class="sd"> the product of a singleton element and an array.</span>

<span class="sd"> Raises</span>
<span class="sd"> ------</span>
<span class="sd"> ValueError</span>
<span class="sd"> Raised if the size of pda1 is not the same as pda2</span>

<span class="sd"> Examples</span>
<span class="sd"> --------</span>
<span class="sd"> &gt;&gt;&gt; x = ak.array([2, 3])</span>
<span class="sd"> &gt;&gt;&gt; y = ak.array([4, 5])</span>
<span class="sd"> &gt;&gt;&gt; ak.dot(x,y)</span>
<span class="sd"> 23</span>
<span class="sd"> &gt;&gt;&gt; ak.dot(x,2)</span>
<span class="sd"> array([4 6])</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="p">(</span>
<span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">pda1</span><span class="p">,</span> <span class="n">pdarray</span><span class="p">)</span>
<span class="ow">and</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">pda2</span><span class="p">,</span> <span class="n">pdarray</span><span class="p">)</span>
<span class="ow">and</span> <span class="p">((</span><span class="n">pda1</span> <span class="ow">is</span> <span class="n">akuint64</span> <span class="ow">and</span> <span class="n">pda2</span> <span class="ow">is</span> <span class="n">akint64</span><span class="p">)</span> <span class="ow">or</span> <span class="p">(</span><span class="n">pda1</span> <span class="ow">is</span> <span class="n">akint64</span> <span class="ow">and</span> <span class="n">pda2</span> <span class="ow">is</span> <span class="n">akuint64</span><span class="p">))</span>
<span class="p">):</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;incompatible types </span><span class="si">{</span><span class="nb">type</span><span class="p">(</span><span class="n">pda1</span><span class="p">)</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="nb">type</span><span class="p">(</span><span class="n">pda2</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">pda1</span><span class="p">,</span> <span class="n">pdarray</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">pda2</span><span class="p">,</span> <span class="n">pdarray</span><span class="p">):</span>
<span class="k">if</span> <span class="n">pda1</span><span class="o">.</span><span class="n">size</span> <span class="o">!=</span> <span class="n">pda2</span><span class="o">.</span><span class="n">size</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;Arrays must be same size, </span><span class="si">{</span><span class="n">pda1</span><span class="o">.</span><span class="n">size</span><span class="si">}</span><span class="s2">, </span><span class="si">{</span><span class="n">pda2</span><span class="o">.</span><span class="n">size</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="nb">sum</span><span class="p">(</span><span class="n">pda1</span> <span class="o">*</span> <span class="n">pda2</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="n">pda1</span> <span class="o">*</span> <span class="n">pda2</span></div>



<div class="viewcode-block" id="prod">
<a class="viewcode-back" href="../../usage/arithmetic.html#arkouda.prod">[docs]</a>
<span class="nd">@typechecked</span>
Expand Down
27 changes: 27 additions & 0 deletions _sources/autoapi/arkouda/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ Functions
arkouda.deg2rad
arkouda.disableVerbose
arkouda.divmod
arkouda.dot
arkouda.dtype
arkouda.enableVerbose
arkouda.exp
Expand Down Expand Up @@ -20769,6 +20770,32 @@ Attributes
(array([5 6 7 1 9]), array([5 0 7 3 9]))


.. py:function:: dot(pda1: Union[numpy.int64, numpy.float64, numpy.uint64, pdarray], pda2: Union[numpy.int64, numpy.float64, numpy.uint64, pdarray]) -> Union[numpy.int64, numpy.float64, numpy.uint64, pdarray]

Returns the sum of the elementwise product of two arrays of the same size (the dot product) or
the product of a singleton element and an array.

:param pda1:
:type pda1: Union[numeric_scalars, pdarray]
:param pda2:
:type pda2: Union[numeric_scalars, pdarray]

:returns: The sum of the elementwise product pda1 and pda2 or
the product of a singleton element and an array.
:rtype: Union[numeric_scalars, pdarray]

:raises ValueError: Raised if the size of pda1 is not the same as pda2

.. rubric:: Examples

>>> x = ak.array([2, 3])
>>> y = ak.array([4, 5])
>>> ak.dot(x,y)
23
>>> ak.dot(x,2)
array([4 6])


.. py:function:: dtype(x)


Expand Down
27 changes: 27 additions & 0 deletions _sources/autoapi/arkouda/pdarrayclass/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Functions
arkouda.pdarrayclass.cov
arkouda.pdarrayclass.ctz
arkouda.pdarrayclass.divmod
arkouda.pdarrayclass.dot
arkouda.pdarrayclass.fmod
arkouda.pdarrayclass.is_sorted
arkouda.pdarrayclass.max
Expand Down Expand Up @@ -363,6 +364,32 @@ Functions
(array([5 6 7 1 9]), array([5 0 7 3 9]))


.. py:function:: dot(pda1: Union[numpy.int64, numpy.float64, numpy.uint64, pdarray], pda2: Union[numpy.int64, numpy.float64, numpy.uint64, pdarray]) -> Union[numpy.int64, numpy.float64, numpy.uint64, pdarray]
Returns the sum of the elementwise product of two arrays of the same size (the dot product) or
the product of a singleton element and an array.

:param pda1:
:type pda1: Union[numeric_scalars, pdarray]
:param pda2:
:type pda2: Union[numeric_scalars, pdarray]

:returns: The sum of the elementwise product pda1 and pda2 or
the product of a singleton element and an array.
:rtype: Union[numeric_scalars, pdarray]

:raises ValueError: Raised if the size of pda1 is not the same as pda2

.. rubric:: Examples

>>> x = ak.array([2, 3])
>>> y = ak.array([4, 5])
>>> ak.dot(x,y)
23
>>> ak.dot(x,2)
array([4 6])


.. py:function:: fmod(dividend: Union[pdarray, arkouda.dtypes.numeric_scalars], divisor: Union[pdarray, arkouda.dtypes.numeric_scalars]) -> pdarray
Returns the element-wise remainder of division.
Expand Down
Loading

0 comments on commit 0cb5192

Please sign in to comment.