Skip to content

Commit

Permalink
Implement dpnp.searchsorted (#1751)
Browse files Browse the repository at this point in the history
* Implement dpnp.searchsorted

* Stated explicit wrapping behavior of out of bound values of sorter per dpctl spec

* Muted previously enabled overflow tests

* Corrected test_argsort_ndarray test with unique generated random values 09e7e33
  • Loading branch information
github-actions[bot] committed Mar 26, 2024
1 parent 4b67698 commit 5599870
Show file tree
Hide file tree
Showing 497 changed files with 1,963 additions and 1,951 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: a48762cc6301ae8d2ab41564f301cb09
config: 46b915136f442aec96cd7825e88512c7
tags: 645f666f9bcd5a90fca523b33c5a78b7
21 changes: 17 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.15.0dev0+71.g241888ad95 documentation</title>
<title>dpnp.dpnp_array &mdash; Data Parallel Extension for NumPy 0.15.0dev0+38.g09e7e3317f 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=ddcc2d19"></script>
<script src="../../_static/documentation_options.js?v=14a0eb4e"></script>
<script src="../../_static/doctools.js?v=888ff710"></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.15.0dev0+71.g241888ad95
0.15.0dev0+38.g09e7e3317f
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down Expand Up @@ -1333,7 +1333,20 @@ <h1>Source code for dpnp.dpnp_array</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">dpnp</span><span class="o">.</span><span class="n">around</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">decimals</span><span class="p">,</span> <span class="n">out</span><span class="p">)</span></div>


<span class="c1"># &#39;searchsorted&#39;,</span>
<div class="viewcode-block" id="dpnp_array.searchsorted">
<a class="viewcode-back" href="../../reference/generated/dpnp.dpnp_array.dpnp_array.html#dpnp.dpnp_array.dpnp_array.searchsorted">[docs]</a>
<span class="k">def</span> <span class="nf">searchsorted</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">v</span><span class="p">,</span> <span class="n">side</span><span class="o">=</span><span class="s2">&quot;left&quot;</span><span class="p">,</span> <span class="n">sorter</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Find indices where elements of `v` should be inserted in `a`</span>
<span class="sd"> to maintain order.</span>

<span class="sd"> Refer to :obj:`dpnp.searchsorted` for full documentation</span>

<span class="sd"> &quot;&quot;&quot;</span>

<span class="k">return</span> <span class="n">dpnp</span><span class="o">.</span><span class="n">searchsorted</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">v</span><span class="p">,</span> <span class="n">side</span><span class="o">=</span><span class="n">side</span><span class="p">,</span> <span class="n">sorter</span><span class="o">=</span><span class="n">sorter</span><span class="p">)</span></div>


<span class="c1"># &#39;setfield&#39;,</span>
<span class="c1"># &#39;setflags&#39;,</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.15.0dev0+71.g241888ad95 documentation</title>
<title>dpnp.dpnp_flatiter &mdash; Data Parallel Extension for NumPy 0.15.0dev0+38.g09e7e3317f 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=ddcc2d19"></script>
<script src="../../_static/documentation_options.js?v=14a0eb4e"></script>
<script src="../../_static/doctools.js?v=888ff710"></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.15.0dev0+71.g241888ad95
0.15.0dev0+38.g09e7e3317f
</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.15.0dev0+71.g241888ad95 documentation</title>
<title>dpnp.dpnp_iface &mdash; Data Parallel Extension for NumPy 0.15.0dev0+38.g09e7e3317f 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=ddcc2d19"></script>
<script src="../../_static/documentation_options.js?v=14a0eb4e"></script>
<script src="../../_static/doctools.js?v=888ff710"></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.15.0dev0+71.g241888ad95
0.15.0dev0+38.g09e7e3317f
</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.15.0dev0+71.g241888ad95 documentation</title>
<title>dpnp.dpnp_iface_arraycreation &mdash; Data Parallel Extension for NumPy 0.15.0dev0+38.g09e7e3317f 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=ddcc2d19"></script>
<script src="../../_static/documentation_options.js?v=14a0eb4e"></script>
<script src="../../_static/doctools.js?v=888ff710"></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.15.0dev0+71.g241888ad95
0.15.0dev0+38.g09e7e3317f
</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_bitwise.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_bitwise &mdash; Data Parallel Extension for NumPy 0.15.0dev0+71.g241888ad95 documentation</title>
<title>dpnp.dpnp_iface_bitwise &mdash; Data Parallel Extension for NumPy 0.15.0dev0+38.g09e7e3317f 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=ddcc2d19"></script>
<script src="../../_static/documentation_options.js?v=14a0eb4e"></script>
<script src="../../_static/doctools.js?v=888ff710"></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.15.0dev0+71.g241888ad95
0.15.0dev0+38.g09e7e3317f
</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.15.0dev0+71.g241888ad95 documentation</title>
<title>dpnp.dpnp_iface_counting &mdash; Data Parallel Extension for NumPy 0.15.0dev0+38.g09e7e3317f 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=ddcc2d19"></script>
<script src="../../_static/documentation_options.js?v=14a0eb4e"></script>
<script src="../../_static/doctools.js?v=888ff710"></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.15.0dev0+71.g241888ad95
0.15.0dev0+38.g09e7e3317f
</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_indexing.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_indexing &mdash; Data Parallel Extension for NumPy 0.15.0dev0+71.g241888ad95 documentation</title>
<title>dpnp.dpnp_iface_indexing &mdash; Data Parallel Extension for NumPy 0.15.0dev0+38.g09e7e3317f 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=ddcc2d19"></script>
<script src="../../_static/documentation_options.js?v=14a0eb4e"></script>
<script src="../../_static/doctools.js?v=888ff710"></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.15.0dev0+71.g241888ad95
0.15.0dev0+38.g09e7e3317f
</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_libmath.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_libmath &mdash; Data Parallel Extension for NumPy 0.15.0dev0+71.g241888ad95 documentation</title>
<title>dpnp.dpnp_iface_libmath &mdash; Data Parallel Extension for NumPy 0.15.0dev0+38.g09e7e3317f 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=ddcc2d19"></script>
<script src="../../_static/documentation_options.js?v=14a0eb4e"></script>
<script src="../../_static/doctools.js?v=888ff710"></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.15.0dev0+71.g241888ad95
0.15.0dev0+38.g09e7e3317f
</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_linearalgebra.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_linearalgebra &mdash; Data Parallel Extension for NumPy 0.15.0dev0+71.g241888ad95 documentation</title>
<title>dpnp.dpnp_iface_linearalgebra &mdash; Data Parallel Extension for NumPy 0.15.0dev0+38.g09e7e3317f 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=ddcc2d19"></script>
<script src="../../_static/documentation_options.js?v=14a0eb4e"></script>
<script src="../../_static/doctools.js?v=888ff710"></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.15.0dev0+71.g241888ad95
0.15.0dev0+38.g09e7e3317f
</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_logic.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_logic &mdash; Data Parallel Extension for NumPy 0.15.0dev0+71.g241888ad95 documentation</title>
<title>dpnp.dpnp_iface_logic &mdash; Data Parallel Extension for NumPy 0.15.0dev0+38.g09e7e3317f 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=ddcc2d19"></script>
<script src="../../_static/documentation_options.js?v=14a0eb4e"></script>
<script src="../../_static/doctools.js?v=888ff710"></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.15.0dev0+71.g241888ad95
0.15.0dev0+38.g09e7e3317f
</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_manipulation.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_manipulation &mdash; Data Parallel Extension for NumPy 0.15.0dev0+71.g241888ad95 documentation</title>
<title>dpnp.dpnp_iface_manipulation &mdash; Data Parallel Extension for NumPy 0.15.0dev0+38.g09e7e3317f 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=ddcc2d19"></script>
<script src="../../_static/documentation_options.js?v=14a0eb4e"></script>
<script src="../../_static/doctools.js?v=888ff710"></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.15.0dev0+71.g241888ad95
0.15.0dev0+38.g09e7e3317f
</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_mathematical.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_mathematical &mdash; Data Parallel Extension for NumPy 0.15.0dev0+71.g241888ad95 documentation</title>
<title>dpnp.dpnp_iface_mathematical &mdash; Data Parallel Extension for NumPy 0.15.0dev0+38.g09e7e3317f 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=ddcc2d19"></script>
<script src="../../_static/documentation_options.js?v=14a0eb4e"></script>
<script src="../../_static/doctools.js?v=888ff710"></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.15.0dev0+71.g241888ad95
0.15.0dev0+38.g09e7e3317f
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down
Loading

0 comments on commit 5599870

Please sign in to comment.