Skip to content

Commit 6cb24ad

Browse files
Raise TypeError in dpnp.ndarray.__array__ b2b7759
1 parent c14c922 commit 6cb24ad

File tree

696 files changed

+1558
-1529
lines changed

Some content is hidden

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

696 files changed

+1558
-1529
lines changed

pull/2260/.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: c82a1496336f02f64c29301613ffcb24
3+
config: 5b4194048054abdb982df34c180173db
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

pull/2260/_modules/dpnp/dpnp_array.html

Lines changed: 21 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.17.0dev4+16.g7ec5a709dc4 documentation</title>
17+
<title>dpnp.dpnp_array &mdash; Data Parallel Extension for NumPy 0.17.0dev4+20.gb2b775972f1 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=74fb8a23"></script>
24+
<script src="../../_static/documentation_options.js?v=3b4812e1"></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>
@@ -700,6 +700,25 @@ <h1>Source code for dpnp.dpnp_array</h1><div class="highlight"><pre>
700700
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Return ``self/value``.&quot;&quot;&quot;</span>
701701
<span class="k">return</span> <span class="n">dpnp</span><span class="o">.</span><span class="n">true_divide</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">)</span>
702702

703+
<span class="nd">@property</span>
704+
<span class="k">def</span><span class="w"> </span><span class="nf">__usm_ndarray__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
705+
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
706+
<span class="sd"> Property to support `__usm_ndarray__` protocol.</span>
707+
708+
<span class="sd"> It assumes to return :class:`dpctl.tensor.usm_ndarray` instance</span>
709+
<span class="sd"> corresponding to the content of the object.</span>
710+
711+
<span class="sd"> This property is intended to speed-up conversion from</span>
712+
<span class="sd"> :class:`dpnp.ndarray` to :class:`dpctl.tensor.usm_ndarray` passed</span>
713+
<span class="sd"> into `dpctl.tensor.asarray` function. The input object that implements</span>
714+
<span class="sd"> `__usm_ndarray__` protocol is recognized as owner of USM allocation</span>
715+
<span class="sd"> that is managed by a smart pointer, and asynchronous deallocation</span>
716+
<span class="sd"> will not involve GIL.</span>
717+
718+
<span class="sd"> &quot;&quot;&quot;</span>
719+
720+
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_array_obj</span>
721+
703722
<span class="k">def</span><span class="w"> </span><span class="fm">__xor__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
704723
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Return ``self^value``.&quot;&quot;&quot;</span>
705724
<span class="k">return</span> <span class="n">dpnp</span><span class="o">.</span><span class="n">bitwise_xor</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">)</span>

pull/2260/_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.17.0dev4+16.g7ec5a709dc4 documentation</title>
17+
<title>dpnp.dpnp_flatiter &mdash; Data Parallel Extension for NumPy 0.17.0dev4+20.gb2b775972f1 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=74fb8a23"></script>
24+
<script src="../../_static/documentation_options.js?v=3b4812e1"></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>

pull/2260/_modules/dpnp/dpnp_iface.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_iface &mdash; Data Parallel Extension for NumPy 0.17.0dev4+16.g7ec5a709dc4 documentation</title>
17+
<title>dpnp.dpnp_iface &mdash; Data Parallel Extension for NumPy 0.17.0dev4+20.gb2b775972f1 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=74fb8a23"></script>
24+
<script src="../../_static/documentation_options.js?v=3b4812e1"></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>

pull/2260/_modules/dpnp/dpnp_iface_arraycreation.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_iface_arraycreation &mdash; Data Parallel Extension for NumPy 0.17.0dev4+16.g7ec5a709dc4 documentation</title>
17+
<title>dpnp.dpnp_iface_arraycreation &mdash; Data Parallel Extension for NumPy 0.17.0dev4+20.gb2b775972f1 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=74fb8a23"></script>
24+
<script src="../../_static/documentation_options.js?v=3b4812e1"></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>

pull/2260/_modules/dpnp/dpnp_iface_bitwise.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_iface_bitwise &mdash; Data Parallel Extension for NumPy 0.17.0dev4+16.g7ec5a709dc4 documentation</title>
17+
<title>dpnp.dpnp_iface_bitwise &mdash; Data Parallel Extension for NumPy 0.17.0dev4+20.gb2b775972f1 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=74fb8a23"></script>
24+
<script src="../../_static/documentation_options.js?v=3b4812e1"></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>

pull/2260/_modules/dpnp/dpnp_iface_counting.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_iface_counting &mdash; Data Parallel Extension for NumPy 0.17.0dev4+16.g7ec5a709dc4 documentation</title>
17+
<title>dpnp.dpnp_iface_counting &mdash; Data Parallel Extension for NumPy 0.17.0dev4+20.gb2b775972f1 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=74fb8a23"></script>
24+
<script src="../../_static/documentation_options.js?v=3b4812e1"></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>

pull/2260/_modules/dpnp/dpnp_iface_functional.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_iface_functional &mdash; Data Parallel Extension for NumPy 0.17.0dev4+16.g7ec5a709dc4 documentation</title>
17+
<title>dpnp.dpnp_iface_functional &mdash; Data Parallel Extension for NumPy 0.17.0dev4+20.gb2b775972f1 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=74fb8a23"></script>
24+
<script src="../../_static/documentation_options.js?v=3b4812e1"></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>

pull/2260/_modules/dpnp/dpnp_iface_histograms.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_iface_histograms &mdash; Data Parallel Extension for NumPy 0.17.0dev4+16.g7ec5a709dc4 documentation</title>
17+
<title>dpnp.dpnp_iface_histograms &mdash; Data Parallel Extension for NumPy 0.17.0dev4+20.gb2b775972f1 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=74fb8a23"></script>
24+
<script src="../../_static/documentation_options.js?v=3b4812e1"></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>

pull/2260/_modules/dpnp/dpnp_iface_indexing.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_iface_indexing &mdash; Data Parallel Extension for NumPy 0.17.0dev4+16.g7ec5a709dc4 documentation</title>
17+
<title>dpnp.dpnp_iface_indexing &mdash; Data Parallel Extension for NumPy 0.17.0dev4+20.gb2b775972f1 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=74fb8a23"></script>
24+
<script src="../../_static/documentation_options.js?v=3b4812e1"></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>

pull/2260/_modules/dpnp/dpnp_iface_libmath.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_iface_libmath &mdash; Data Parallel Extension for NumPy 0.17.0dev4+16.g7ec5a709dc4 documentation</title>
17+
<title>dpnp.dpnp_iface_libmath &mdash; Data Parallel Extension for NumPy 0.17.0dev4+20.gb2b775972f1 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=74fb8a23"></script>
24+
<script src="../../_static/documentation_options.js?v=3b4812e1"></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>

pull/2260/_modules/dpnp/dpnp_iface_linearalgebra.html

Lines changed: 8 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_iface_linearalgebra &mdash; Data Parallel Extension for NumPy 0.17.0dev4+16.g7ec5a709dc4 documentation</title>
17+
<title>dpnp.dpnp_iface_linearalgebra &mdash; Data Parallel Extension for NumPy 0.17.0dev4+20.gb2b775972f1 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=74fb8a23"></script>
24+
<script src="../../_static/documentation_options.js?v=3b4812e1"></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>
@@ -641,6 +641,12 @@ <h1>Source code for dpnp.dpnp_iface_linearalgebra</h1><div class="highlight"><pr
641641

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

644+
<span class="c1"># explicit casting to numpy array if applicable</span>
645+
<span class="n">operands</span> <span class="o">=</span> <span class="p">[</span>
646+
<span class="n">dpnp</span><span class="o">.</span><span class="n">asnumpy</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="k">if</span> <span class="n">dpnp</span><span class="o">.</span><span class="n">is_supported_array_type</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="k">else</span> <span class="n">x</span>
647+
<span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">operands</span>
648+
<span class="p">]</span>
649+
644650
<span class="k">return</span> <span class="n">numpy</span><span class="o">.</span><span class="n">einsum_path</span><span class="p">(</span>
645651
<span class="o">*</span><span class="n">operands</span><span class="p">,</span>
646652
<span class="n">optimize</span><span class="o">=</span><span class="n">optimize</span><span class="p">,</span>

pull/2260/_modules/dpnp/dpnp_iface_logic.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_iface_logic &mdash; Data Parallel Extension for NumPy 0.17.0dev4+16.g7ec5a709dc4 documentation</title>
17+
<title>dpnp.dpnp_iface_logic &mdash; Data Parallel Extension for NumPy 0.17.0dev4+20.gb2b775972f1 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=74fb8a23"></script>
24+
<script src="../../_static/documentation_options.js?v=3b4812e1"></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>

0 commit comments

Comments
 (0)