Skip to content

Commit

Permalink
Update dpnp.take implementation to get rid of limitations for input…
Browse files Browse the repository at this point in the history
… arguments (#1909)

* Remove limitations from dpnp.take implementation

* Add more test to cover specail cases and increase code coverage

* Applied pre-commit hook

* Corrected test_over_index

* Update docsctrings with resolving typos

* Use dpnp.reshape() to change shape and create dpnp array from usm_ndarray result

* Remove data syncronization from dpnp.get_result_array()

* Update dpnp/dpnp_iface_indexing.py

Co-authored-by: vtavana <[email protected]>

* Applied review comments

---------

Co-authored-by: vtavana <[email protected]> ce26cf0
  • Loading branch information
github-actions[bot] committed Jul 10, 2024
1 parent 2ed936e commit 8235818
Show file tree
Hide file tree
Showing 495 changed files with 1,601 additions and 1,540 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 63c0de3e0ae351af912d25c77eecdded
config: 3467c298913e78a58bb2d8c148434fe2
tags: 645f666f9bcd5a90fca523b33c5a78b7
8 changes: 4 additions & 4 deletions _modules/dpnp/dpnp_array.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</script>

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>dpnp.dpnp_array &mdash; Data Parallel Extension for NumPy 0.16.0dev0+46.geacaa5d814 documentation</title>
<title>dpnp.dpnp_array &mdash; Data Parallel Extension for NumPy 0.16.0dev0+47.gce26cf0c3 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" />

Expand All @@ -23,7 +23,7 @@

<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../_static/documentation_options.js?v=2f803beb"></script>
<script src="../../_static/documentation_options.js?v=0136441f"></script>
<script src="../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/js/theme.js"></script>
Expand All @@ -43,7 +43,7 @@
Data Parallel Extension for NumPy
</a>
<div class="version">
0.16.0dev0+46.geacaa5d814
0.16.0dev0+47.gce26cf0c3
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down Expand Up @@ -1634,7 +1634,7 @@ <h1>Source code for dpnp.dpnp_array</h1><div class="highlight"><pre>

<div class="viewcode-block" id="dpnp_array.take">
<a class="viewcode-back" href="../../reference/generated/dpnp.dpnp_array.dpnp_array.html#dpnp.dpnp_array.dpnp_array.take">[docs]</a>
<span class="k">def</span> <span class="nf">take</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">indices</span><span class="p">,</span> <span class="o">/</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">out</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">mode</span><span class="o">=</span><span class="s2">&quot;wrap&quot;</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">take</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">indices</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">out</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">mode</span><span class="o">=</span><span class="s2">&quot;wrap&quot;</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Take elements from an array along an axis.</span>

Expand Down
6 changes: 3 additions & 3 deletions _modules/dpnp/dpnp_flatiter.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</script>

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>dpnp.dpnp_flatiter &mdash; Data Parallel Extension for NumPy 0.16.0dev0+46.geacaa5d814 documentation</title>
<title>dpnp.dpnp_flatiter &mdash; Data Parallel Extension for NumPy 0.16.0dev0+47.gce26cf0c3 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" />

Expand All @@ -23,7 +23,7 @@

<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../_static/documentation_options.js?v=2f803beb"></script>
<script src="../../_static/documentation_options.js?v=0136441f"></script>
<script src="../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/js/theme.js"></script>
Expand All @@ -43,7 +43,7 @@
Data Parallel Extension for NumPy
</a>
<div class="version">
0.16.0dev0+46.geacaa5d814
0.16.0dev0+47.gce26cf0c3
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down
6 changes: 3 additions & 3 deletions _modules/dpnp/dpnp_iface.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</script>

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>dpnp.dpnp_iface &mdash; Data Parallel Extension for NumPy 0.16.0dev0+46.geacaa5d814 documentation</title>
<title>dpnp.dpnp_iface &mdash; Data Parallel Extension for NumPy 0.16.0dev0+47.gce26cf0c3 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" />

Expand All @@ -23,7 +23,7 @@

<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../_static/documentation_options.js?v=2f803beb"></script>
<script src="../../_static/documentation_options.js?v=0136441f"></script>
<script src="../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/js/theme.js"></script>
Expand All @@ -43,7 +43,7 @@
Data Parallel Extension for NumPy
</a>
<div class="version">
0.16.0dev0+46.geacaa5d814
0.16.0dev0+47.gce26cf0c3
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down
6 changes: 3 additions & 3 deletions _modules/dpnp/dpnp_iface_arraycreation.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</script>

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>dpnp.dpnp_iface_arraycreation &mdash; Data Parallel Extension for NumPy 0.16.0dev0+46.geacaa5d814 documentation</title>
<title>dpnp.dpnp_iface_arraycreation &mdash; Data Parallel Extension for NumPy 0.16.0dev0+47.gce26cf0c3 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" />

Expand All @@ -23,7 +23,7 @@

<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../_static/documentation_options.js?v=2f803beb"></script>
<script src="../../_static/documentation_options.js?v=0136441f"></script>
<script src="../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/js/theme.js"></script>
Expand All @@ -43,7 +43,7 @@
Data Parallel Extension for NumPy
</a>
<div class="version">
0.16.0dev0+46.geacaa5d814
0.16.0dev0+47.gce26cf0c3
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down
6 changes: 3 additions & 3 deletions _modules/dpnp/dpnp_iface_counting.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</script>

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>dpnp.dpnp_iface_counting &mdash; Data Parallel Extension for NumPy 0.16.0dev0+46.geacaa5d814 documentation</title>
<title>dpnp.dpnp_iface_counting &mdash; Data Parallel Extension for NumPy 0.16.0dev0+47.gce26cf0c3 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" />

Expand All @@ -23,7 +23,7 @@

<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../_static/documentation_options.js?v=2f803beb"></script>
<script src="../../_static/documentation_options.js?v=0136441f"></script>
<script src="../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/js/theme.js"></script>
Expand All @@ -43,7 +43,7 @@
Data Parallel Extension for NumPy
</a>
<div class="version">
0.16.0dev0+46.geacaa5d814
0.16.0dev0+47.gce26cf0c3
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down
6 changes: 3 additions & 3 deletions _modules/dpnp/dpnp_iface_histograms.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</script>

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>dpnp.dpnp_iface_histograms &mdash; Data Parallel Extension for NumPy 0.16.0dev0+46.geacaa5d814 documentation</title>
<title>dpnp.dpnp_iface_histograms &mdash; Data Parallel Extension for NumPy 0.16.0dev0+47.gce26cf0c3 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" />

Expand All @@ -23,7 +23,7 @@

<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../_static/documentation_options.js?v=2f803beb"></script>
<script src="../../_static/documentation_options.js?v=0136441f"></script>
<script src="../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/js/theme.js"></script>
Expand All @@ -43,7 +43,7 @@
Data Parallel Extension for NumPy
</a>
<div class="version">
0.16.0dev0+46.geacaa5d814
0.16.0dev0+47.gce26cf0c3
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down
Loading

0 comments on commit 8235818

Please sign in to comment.