Skip to content

Commit

Permalink
add support for axes as list in dpnp.ndarray.transpose (IntelPyth…
Browse files Browse the repository at this point in the history
…on#1770)

* support axes as list

* fix a bug

* update description

* fix docstring when bullet is used 5f99f4e
  • Loading branch information
github-actions[bot] committed Apr 3, 2024
1 parent 4cb5e0c commit a508c72
Show file tree
Hide file tree
Showing 482 changed files with 1,775 additions and 1,688 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: 765d7905252e1a8f8a751a625fcbdee5
config: 1ea23032695c50cde8227da7c5c6391b
tags: 645f666f9bcd5a90fca523b33c5a78b7
32 changes: 21 additions & 11 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.11.1+518.ga134bdc3 documentation</title>
<title>dpnp.dpnp_array &mdash; Data Parallel Extension for NumPy 0.11.1+522.g5f99f4ef 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=f2daf994"></script>
<script src="../../_static/documentation_options.js?v=71e3f2cc"></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.11.1+518.ga134bdc3
0.11.1+522.g5f99f4ef
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down Expand Up @@ -1552,21 +1552,31 @@ <h1>Source code for dpnp.dpnp_array</h1><div class="highlight"><pre>

<span class="sd"> For full documentation refer to :obj:`numpy.ndarray.transpose`.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> axes : None, tuple or list of ints, n ints, optional</span>
<span class="sd"> * ``None`` or no argument: reverses the order of the axes.</span>
<span class="sd"> * tuple or list of ints: `i` in the `j`-th place in the tuple/list</span>
<span class="sd"> means that the array’s `i`-th axis becomes the transposed</span>
<span class="sd"> array’s `j`-th axis.</span>
<span class="sd"> * n ints: same as an n-tuple/n-list of the same ints (this form is</span>
<span class="sd"> intended simply as a “convenience” alternative to the tuple form).</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> y : dpnp.ndarray</span>
<span class="sd"> out : dpnp.ndarray</span>
<span class="sd"> View of the array with its axes suitably permuted.</span>

<span class="sd"> See Also</span>
<span class="sd"> --------</span>
<span class="sd"> :obj:`dpnp.transpose` : Equivalent function.</span>
<span class="sd"> :obj:`dpnp.ndarray.ndarray.T` : Array property returning the array transposed.</span>
<span class="sd"> :obj:`dpnp.ndarray.reshape` : Give a new shape to an array without changing its data.</span>
<span class="sd"> :obj:`dpnp.transpose` : Equivalent function.</span>
<span class="sd"> :obj:`dpnp.ndarray.ndarray.T` : Array property returning the array transposed.</span>
<span class="sd"> :obj:`dpnp.ndarray.reshape` : Give a new shape to an array without changing its data.</span>

<span class="sd"> Examples</span>
<span class="sd"> --------</span>
<span class="sd"> &gt;&gt;&gt; import dpnp as dp</span>
<span class="sd"> &gt;&gt;&gt; a = dp.array([[1, 2], [3, 4]])</span>
<span class="sd"> &gt;&gt;&gt; import dpnp as np</span>
<span class="sd"> &gt;&gt;&gt; a = np.array([[1, 2], [3, 4]])</span>
<span class="sd"> &gt;&gt;&gt; a</span>
<span class="sd"> array([[1, 2],</span>
<span class="sd"> [3, 4]])</span>
Expand All @@ -1577,7 +1587,7 @@ <h1>Source code for dpnp.dpnp_array</h1><div class="highlight"><pre>
<span class="sd"> array([[1, 3],</span>
<span class="sd"> [2, 4]])</span>

<span class="sd"> &gt;&gt;&gt; a = dp.array([1, 2, 3, 4])</span>
<span class="sd"> &gt;&gt;&gt; a = np.array([1, 2, 3, 4])</span>
<span class="sd"> &gt;&gt;&gt; a</span>
<span class="sd"> array([1, 2, 3, 4])</span>
<span class="sd"> &gt;&gt;&gt; a.transpose()</span>
Expand All @@ -1590,7 +1600,7 @@ <h1>Source code for dpnp.dpnp_array</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="bp">self</span>

<span class="n">axes_len</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">axes</span><span class="p">)</span>
<span class="k">if</span> <span class="n">axes_len</span> <span class="o">==</span> <span class="mi">1</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">axes</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="nb">tuple</span><span class="p">):</span>
<span class="k">if</span> <span class="n">axes_len</span> <span class="o">==</span> <span class="mi">1</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">axes</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="p">(</span><span class="nb">tuple</span><span class="p">,</span> <span class="nb">list</span><span class="p">)):</span>
<span class="n">axes</span> <span class="o">=</span> <span class="n">axes</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>

<span class="n">res</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="fm">__new__</span><span class="p">(</span><span class="n">dpnp_array</span><span class="p">)</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.11.1+518.ga134bdc3 documentation</title>
<title>dpnp.dpnp_flatiter &mdash; Data Parallel Extension for NumPy 0.11.1+522.g5f99f4ef 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=f2daf994"></script>
<script src="../../_static/documentation_options.js?v=71e3f2cc"></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.11.1+518.ga134bdc3
0.11.1+522.g5f99f4ef
</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.11.1+518.ga134bdc3 documentation</title>
<title>dpnp.dpnp_iface &mdash; Data Parallel Extension for NumPy 0.11.1+522.g5f99f4ef 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=f2daf994"></script>
<script src="../../_static/documentation_options.js?v=71e3f2cc"></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.11.1+518.ga134bdc3
0.11.1+522.g5f99f4ef
</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.11.1+518.ga134bdc3 documentation</title>
<title>dpnp.dpnp_iface_arraycreation &mdash; Data Parallel Extension for NumPy 0.11.1+522.g5f99f4ef 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=f2daf994"></script>
<script src="../../_static/documentation_options.js?v=71e3f2cc"></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.11.1+518.ga134bdc3
0.11.1+522.g5f99f4ef
</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.11.1+518.ga134bdc3 documentation</title>
<title>dpnp.dpnp_iface_bitwise &mdash; Data Parallel Extension for NumPy 0.11.1+522.g5f99f4ef 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=f2daf994"></script>
<script src="../../_static/documentation_options.js?v=71e3f2cc"></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.11.1+518.ga134bdc3
0.11.1+522.g5f99f4ef
</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.11.1+518.ga134bdc3 documentation</title>
<title>dpnp.dpnp_iface_counting &mdash; Data Parallel Extension for NumPy 0.11.1+522.g5f99f4ef 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=f2daf994"></script>
<script src="../../_static/documentation_options.js?v=71e3f2cc"></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.11.1+518.ga134bdc3
0.11.1+522.g5f99f4ef
</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.11.1+518.ga134bdc3 documentation</title>
<title>dpnp.dpnp_iface_indexing &mdash; Data Parallel Extension for NumPy 0.11.1+522.g5f99f4ef 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=f2daf994"></script>
<script src="../../_static/documentation_options.js?v=71e3f2cc"></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.11.1+518.ga134bdc3
0.11.1+522.g5f99f4ef
</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.11.1+518.ga134bdc3 documentation</title>
<title>dpnp.dpnp_iface_libmath &mdash; Data Parallel Extension for NumPy 0.11.1+522.g5f99f4ef 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=f2daf994"></script>
<script src="../../_static/documentation_options.js?v=71e3f2cc"></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.11.1+518.ga134bdc3
0.11.1+522.g5f99f4ef
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down
18 changes: 9 additions & 9 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.11.1+518.ga134bdc3 documentation</title>
<title>dpnp.dpnp_iface_linearalgebra &mdash; Data Parallel Extension for NumPy 0.11.1+522.g5f99f4ef 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=f2daf994"></script>
<script src="../../_static/documentation_options.js?v=71e3f2cc"></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.11.1+518.ga134bdc3
0.11.1+522.g5f99f4ef
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down Expand Up @@ -700,12 +700,12 @@ <h1>Source code for dpnp.dpnp_iface_linearalgebra</h1><div class="highlight"><pr
<span class="sd"> Second input array. Both inputs `a` and `b` can not be scalars</span>
<span class="sd"> at the same time.</span>
<span class="sd"> axes : int or (2,) array_like</span>
<span class="sd"> * integer_like</span>
<span class="sd"> If an int `N`, sum over the last `N` axes of `a` and the first `N`</span>
<span class="sd"> axes of `b` in order. The sizes of the corresponding axes must match.</span>
<span class="sd"> * (2,) array_like</span>
<span class="sd"> Or, a list of axes to be summed over, first sequence applying to `a`,</span>
<span class="sd"> second to `b`. Both elements array_like must be of the same length.</span>
<span class="sd"> * integer_like: If an int `N`, sum over the last `N` axes of `a` and</span>
<span class="sd"> the first `N` axes of `b` in order. The sizes of the corresponding</span>
<span class="sd"> axes must match.</span>
<span class="sd"> * (2,) array_like: A list of axes to be summed over, first sequence</span>
<span class="sd"> applying to `a`, second to `b`. Both elements array_like must be of</span>
<span class="sd"> the same length.</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
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.11.1+518.ga134bdc3 documentation</title>
<title>dpnp.dpnp_iface_logic &mdash; Data Parallel Extension for NumPy 0.11.1+522.g5f99f4ef 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=f2daf994"></script>
<script src="../../_static/documentation_options.js?v=71e3f2cc"></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.11.1+518.ga134bdc3
0.11.1+522.g5f99f4ef
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down
Loading

0 comments on commit a508c72

Please sign in to comment.