Skip to content

Commit b078fe7

Browse files
Unify dpnp public API exports by refactoring dpnp_iface.py (#2665)
This PR proposes to refactor the export structure of `dpnp_iface.py` by moving all python function exports into `dpnp/__init__.py` Redundant `__all__` declarations and wildcard imports inside `dpnp_iface.py` have been removed. 167c3e6
1 parent da6cdd6 commit b078fe7

File tree

755 files changed

+1752
-2182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

755 files changed

+1752
-2182
lines changed

.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 4e20cbf9a0a9dcc6e2d853d7869e08a3
3+
config: fe953ae46a52b1fa1dcfd6cf4b5be422
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

_modules/dpnp/dpnp_array.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_array &mdash; Data Parallel Extension for NumPy 0.20.0dev1+20.g21718ad6b85 documentation</title>
17+
<title>dpnp.dpnp_array &mdash; Data Parallel Extension for NumPy 0.20.0dev1+21.g167c3e6dac6 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=82fce378"></script>
24+
<script src="../../_static/documentation_options.js?v=cb75ae26"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>

_modules/dpnp/dpnp_array_api_info.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_array_api_info &mdash; Data Parallel Extension for NumPy 0.20.0dev1+20.g21718ad6b85 documentation</title>
17+
<title>dpnp.dpnp_array_api_info &mdash; Data Parallel Extension for NumPy 0.20.0dev1+21.g167c3e6dac6 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=82fce378"></script>
24+
<script src="../../_static/documentation_options.js?v=cb75ae26"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>

_modules/dpnp/dpnp_flatiter.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_flatiter &mdash; Data Parallel Extension for NumPy 0.20.0dev1+20.g21718ad6b85 documentation</title>
17+
<title>dpnp.dpnp_flatiter &mdash; Data Parallel Extension for NumPy 0.20.0dev1+21.g167c3e6dac6 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=82fce378"></script>
24+
<script src="../../_static/documentation_options.js?v=cb75ae26"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>

_modules/dpnp/dpnp_iface.html

Lines changed: 7 additions & 77 deletions
Large diffs are not rendered by default.

_modules/dpnp/dpnp_iface_arraycreation.html

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_iface_arraycreation &mdash; Data Parallel Extension for NumPy 0.20.0dev1+20.g21718ad6b85 documentation</title>
17+
<title>dpnp.dpnp_iface_arraycreation &mdash; Data Parallel Extension for NumPy 0.20.0dev1+21.g167c3e6dac6 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=82fce378"></script>
24+
<script src="../../_static/documentation_options.js?v=cb75ae26"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>
@@ -146,47 +146,6 @@ <h1>Source code for dpnp.dpnp_iface_arraycreation</h1><div class="highlight"><pr
146146
<span class="c1"># pylint: disable=no-name-in-module</span>
147147
<span class="kn">from</span><span class="w"> </span><span class="nn">.dpnp_utils</span><span class="w"> </span><span class="kn">import</span> <span class="n">get_usm_allocations</span><span class="p">,</span> <span class="n">map_dtype_to_device</span>
148148

149-
<span class="n">__all__</span> <span class="o">=</span> <span class="p">[</span>
150-
<span class="s2">&quot;arange&quot;</span><span class="p">,</span>
151-
<span class="s2">&quot;array&quot;</span><span class="p">,</span>
152-
<span class="s2">&quot;asanyarray&quot;</span><span class="p">,</span>
153-
<span class="s2">&quot;asarray&quot;</span><span class="p">,</span>
154-
<span class="s2">&quot;ascontiguousarray&quot;</span><span class="p">,</span>
155-
<span class="s2">&quot;asfortranarray&quot;</span><span class="p">,</span>
156-
<span class="s2">&quot;astype&quot;</span><span class="p">,</span>
157-
<span class="s2">&quot;copy&quot;</span><span class="p">,</span>
158-
<span class="s2">&quot;diag&quot;</span><span class="p">,</span>
159-
<span class="s2">&quot;diagflat&quot;</span><span class="p">,</span>
160-
<span class="s2">&quot;empty&quot;</span><span class="p">,</span>
161-
<span class="s2">&quot;empty_like&quot;</span><span class="p">,</span>
162-
<span class="s2">&quot;eye&quot;</span><span class="p">,</span>
163-
<span class="s2">&quot;frombuffer&quot;</span><span class="p">,</span>
164-
<span class="s2">&quot;fromfile&quot;</span><span class="p">,</span>
165-
<span class="s2">&quot;fromfunction&quot;</span><span class="p">,</span>
166-
<span class="s2">&quot;fromiter&quot;</span><span class="p">,</span>
167-
<span class="s2">&quot;fromstring&quot;</span><span class="p">,</span>
168-
<span class="s2">&quot;from_dlpack&quot;</span><span class="p">,</span>
169-
<span class="s2">&quot;full&quot;</span><span class="p">,</span>
170-
<span class="s2">&quot;full_like&quot;</span><span class="p">,</span>
171-
<span class="s2">&quot;geomspace&quot;</span><span class="p">,</span>
172-
<span class="s2">&quot;identity&quot;</span><span class="p">,</span>
173-
<span class="s2">&quot;linspace&quot;</span><span class="p">,</span>
174-
<span class="s2">&quot;loadtxt&quot;</span><span class="p">,</span>
175-
<span class="s2">&quot;logspace&quot;</span><span class="p">,</span>
176-
<span class="s2">&quot;meshgrid&quot;</span><span class="p">,</span>
177-
<span class="s2">&quot;mgrid&quot;</span><span class="p">,</span>
178-
<span class="s2">&quot;ogrid&quot;</span><span class="p">,</span>
179-
<span class="s2">&quot;ones&quot;</span><span class="p">,</span>
180-
<span class="s2">&quot;ones_like&quot;</span><span class="p">,</span>
181-
<span class="s2">&quot;trace&quot;</span><span class="p">,</span>
182-
<span class="s2">&quot;tri&quot;</span><span class="p">,</span>
183-
<span class="s2">&quot;tril&quot;</span><span class="p">,</span>
184-
<span class="s2">&quot;triu&quot;</span><span class="p">,</span>
185-
<span class="s2">&quot;vander&quot;</span><span class="p">,</span>
186-
<span class="s2">&quot;zeros&quot;</span><span class="p">,</span>
187-
<span class="s2">&quot;zeros_like&quot;</span><span class="p">,</span>
188-
<span class="p">]</span>
189-
190149

191150
<span class="k">def</span><span class="w"> </span><span class="nf">_get_empty_array</span><span class="p">(</span>
192151
<span class="n">a</span><span class="p">,</span>

_modules/dpnp/dpnp_iface_bitwise.html

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_iface_bitwise &mdash; Data Parallel Extension for NumPy 0.20.0dev1+20.g21718ad6b85 documentation</title>
17+
<title>dpnp.dpnp_iface_bitwise &mdash; Data Parallel Extension for NumPy 0.20.0dev1+21.g167c3e6dac6 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=82fce378"></script>
24+
<script src="../../_static/documentation_options.js?v=cb75ae26"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>
@@ -134,21 +134,6 @@ <h1>Source code for dpnp.dpnp_iface_bitwise</h1><div class="highlight"><pre>
134134
<span class="kn">import</span><span class="w"> </span><span class="nn">dpnp.backend.extensions.ufunc._ufunc_impl</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">ufi</span>
135135
<span class="kn">from</span><span class="w"> </span><span class="nn">dpnp.dpnp_algo.dpnp_elementwise_common</span><span class="w"> </span><span class="kn">import</span> <span class="n">DPNPBinaryFunc</span><span class="p">,</span> <span class="n">DPNPUnaryFunc</span>
136136

137-
<span class="n">__all__</span> <span class="o">=</span> <span class="p">[</span>
138-
<span class="s2">&quot;binary_repr&quot;</span><span class="p">,</span>
139-
<span class="s2">&quot;bitwise_and&quot;</span><span class="p">,</span>
140-
<span class="s2">&quot;bitwise_count&quot;</span><span class="p">,</span>
141-
<span class="s2">&quot;bitwise_invert&quot;</span><span class="p">,</span>
142-
<span class="s2">&quot;bitwise_left_shift&quot;</span><span class="p">,</span>
143-
<span class="s2">&quot;bitwise_not&quot;</span><span class="p">,</span>
144-
<span class="s2">&quot;bitwise_or&quot;</span><span class="p">,</span>
145-
<span class="s2">&quot;bitwise_right_shift&quot;</span><span class="p">,</span>
146-
<span class="s2">&quot;bitwise_xor&quot;</span><span class="p">,</span>
147-
<span class="s2">&quot;invert&quot;</span><span class="p">,</span>
148-
<span class="s2">&quot;left_shift&quot;</span><span class="p">,</span>
149-
<span class="s2">&quot;right_shift&quot;</span><span class="p">,</span>
150-
<span class="p">]</span>
151-
152137

153138
<div class="viewcode-block" id="binary_repr">
154139
<a class="viewcode-back" href="../../reference/generated/dpnp.binary_repr.html#dpnp.binary_repr">[docs]</a>

_modules/dpnp/dpnp_iface_counting.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_iface_counting &mdash; Data Parallel Extension for NumPy 0.20.0dev1+20.g21718ad6b85 documentation</title>
17+
<title>dpnp.dpnp_iface_counting &mdash; Data Parallel Extension for NumPy 0.20.0dev1+21.g167c3e6dac6 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=82fce378"></script>
24+
<script src="../../_static/documentation_options.js?v=cb75ae26"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>
@@ -128,8 +128,6 @@ <h1>Source code for dpnp.dpnp_iface_counting</h1><div class="highlight"><pre>
128128

129129
<span class="kn">import</span><span class="w"> </span><span class="nn">dpnp</span>
130130

131-
<span class="n">__all__</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;count_nonzero&quot;</span><span class="p">]</span>
132-
133131

134132
<div class="viewcode-block" id="count_nonzero">
135133
<a class="viewcode-back" href="../../reference/generated/dpnp.count_nonzero.html#dpnp.count_nonzero">[docs]</a>

_modules/dpnp/dpnp_iface_functional.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_iface_functional &mdash; Data Parallel Extension for NumPy 0.20.0dev1+20.g21718ad6b85 documentation</title>
17+
<title>dpnp.dpnp_iface_functional &mdash; Data Parallel Extension for NumPy 0.20.0dev1+21.g167c3e6dac6 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=82fce378"></script>
24+
<script src="../../_static/documentation_options.js?v=cb75ae26"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>
@@ -136,8 +136,6 @@ <h1>Source code for dpnp.dpnp_iface_functional</h1><div class="highlight"><pre>
136136
<span class="c1"># pylint: disable=no-name-in-module</span>
137137
<span class="kn">from</span><span class="w"> </span><span class="nn">dpnp.dpnp_utils</span><span class="w"> </span><span class="kn">import</span> <span class="n">get_usm_allocations</span>
138138

139-
<span class="n">__all__</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;apply_along_axis&quot;</span><span class="p">,</span> <span class="s2">&quot;apply_over_axes&quot;</span><span class="p">,</span> <span class="s2">&quot;piecewise&quot;</span><span class="p">]</span>
140-
141139

142140
<div class="viewcode-block" id="apply_along_axis">
143141
<a class="viewcode-back" href="../../reference/generated/dpnp.apply_along_axis.html#dpnp.apply_along_axis">[docs]</a>

_modules/dpnp/dpnp_iface_histograms.html

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
</script>
1515

1616
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
17-
<title>dpnp.dpnp_iface_histograms &mdash; Data Parallel Extension for NumPy 0.20.0dev1+20.g21718ad6b85 documentation</title>
17+
<title>dpnp.dpnp_iface_histograms &mdash; Data Parallel Extension for NumPy 0.20.0dev1+21.g167c3e6dac6 documentation</title>
1818
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=03e43079" />
1919
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
2020

2121

2222
<script src="../../_static/jquery.js?v=5d32c60e"></script>
2323
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
24-
<script src="../../_static/documentation_options.js?v=82fce378"></script>
24+
<script src="../../_static/documentation_options.js?v=cb75ae26"></script>
2525
<script src="../../_static/doctools.js?v=9bcbadda"></script>
2626
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
2727
<script src="../../_static/js/theme.js"></script>
@@ -142,15 +142,6 @@ <h1>Source code for dpnp.dpnp_iface_histograms</h1><div class="highlight"><pre>
142142
<span class="c1"># pylint: disable=no-name-in-module</span>
143143
<span class="kn">from</span><span class="w"> </span><span class="nn">.dpnp_utils</span><span class="w"> </span><span class="kn">import</span> <span class="n">get_usm_allocations</span>
144144

145-
<span class="n">__all__</span> <span class="o">=</span> <span class="p">[</span>
146-
<span class="s2">&quot;bincount&quot;</span><span class="p">,</span>
147-
<span class="s2">&quot;digitize&quot;</span><span class="p">,</span>
148-
<span class="s2">&quot;histogram&quot;</span><span class="p">,</span>
149-
<span class="s2">&quot;histogram_bin_edges&quot;</span><span class="p">,</span>
150-
<span class="s2">&quot;histogram2d&quot;</span><span class="p">,</span>
151-
<span class="s2">&quot;histogramdd&quot;</span><span class="p">,</span>
152-
<span class="p">]</span>
153-
154145
<span class="c1"># range is a keyword argument to many functions, so save the builtin so they can</span>
155146
<span class="c1"># use it.</span>
156147
<span class="n">_range</span> <span class="o">=</span> <span class="nb">range</span>

0 commit comments

Comments
 (0)