You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
an object representing SYCL USM allocation and implementing
831
831
<codeclass="docutils literal notranslate"><spanclass="pre">__sycl_usm_array_interface__</span></code> protocol, an instance
832
-
of <aclass="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.1)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">numpy.ndarray</span></code></a>, an object supporting Python buffer
832
+
of <aclass="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.2)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">numpy.ndarray</span></code></a>, an object supporting Python buffer
833
833
protocol, a Python scalar, or a (possibly nested) sequence of
834
834
Python scalars.</p></li>
835
835
<li><p><strong>dtype</strong> (<em>data type</em><em>, </em><em>optional</em>) – output array data type. If <codeclass="docutils literal notranslate"><spanclass="pre">dtype</span></code> is
<li><p><strong>order</strong> (<em>{"C"</em><em>, </em><em>"F"</em><em>, </em><em>"A"</em><em>, </em><em>"K"}</em><em>, </em><em>optional</em>) – Controls memory layout of the resulting array if a copy
834
834
is returned.</p></li>
835
835
<li><p><strong>casting</strong> (<em>{'no'</em><em>, </em><em>'equiv'</em><em>, </em><em>'safe'</em><em>, </em><em>'same_kind'</em><em>, </em><em>'unsafe'}</em><em>, </em><em>optional</em>) – Controls what kind of data casting may occur. Please see
836
-
<aclass="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.astype.html#numpy.ndarray.astype" title="(in NumPy v2.1)"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">numpy.ndarray.astype()</span></code></a> for description of casting modes.</p></li>
836
+
<aclass="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.astype.html#numpy.ndarray.astype" title="(in NumPy v2.2)"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">numpy.ndarray.astype()</span></code></a> for description of casting modes.</p></li>
837
837
<li><p><strong>copy</strong> (<aclass="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><em>bool</em></a><em>, </em><em>optional</em>) – By default, <cite>astype</cite> always returns a newly allocated array.
838
838
If this keyword is set to <cite>False</cite>, a view of the input array
<li><p><strong>x</strong> (<aclass="reference internal" href="dpctl.tensor.usm_ndarray.html#dpctl.tensor.usm_ndarray" title="dpctl.tensor.usm_ndarray"><em>usm_ndarray</em></a>) – Input array from which to derive the output array shape.</p></li>
830
830
<li><p><strong>dtype</strong> (<em>optional</em>) – data type of the array. Can be a typestring,
Raises <aclass="reference external" href="https://docs.python.org/3/library/exceptions.html#TypeError" title="(in Python v3.13)"><codeclass="xref py py-exc docutils literal notranslate"><spanclass="pre">TypeError</span></code></a> if <codeclass="docutils literal notranslate"><spanclass="pre">k</span></code> is not an integer.
a NumPy scalar type. Default: <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code></p></li>
840
840
<li><p><strong>order</strong> (<em>"C"</em><em> or </em><em>"F"</em>) – memory layout for the array. Default: <codeclass="docutils literal notranslate"><spanclass="pre">"C"</span></code></p></li>
841
841
<li><p><strong>device</strong> (<em>optional</em>) – array API concept of device where the output array
from a Python object <codeclass="docutils literal notranslate"><spanclass="pre">x</span></code> that implements <codeclass="docutils literal notranslate"><spanclass="pre">__dlpack__</span></code> protocol.</p>
depends on where the data backing up input object <codeclass="docutils literal notranslate"><spanclass="pre">x</span></code> resides.
892
892
If it resides in a USM allocation on a SYCL device, the
893
893
type <aclass="reference internal" href="dpctl.tensor.usm_ndarray.html#dpctl.tensor.usm_ndarray" title="dpctl.tensor.usm_ndarray"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dpctl.tensor.usm_ndarray</span></code></a> is returned, otherwise if it resides
894
-
on <codeclass="docutils literal notranslate"><spanclass="pre">"kDLCPU"</span></code> device the type is <aclass="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.1)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">numpy.ndarray</span></code></a>, and otherwise
894
+
on <codeclass="docutils literal notranslate"><spanclass="pre">"kDLCPU"</span></code> device the type is <aclass="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v2.2)"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">numpy.ndarray</span></code></a>, and otherwise
<li><p><strong>device</strong> (<aclass="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.13)"><em>object</em></a>) – array API specification of device where the
831
831
output array is created. Device can be specified by a
<li><p><strong>shape</strong> (<aclass="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.13)"><em>tuple</em></a>) – Dimensions of the array to be created.</p></li>
or a NumPy scalar type. Default: <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code></p></li>
834
834
<li><p><strong>order</strong> (<em>"C"</em><em>, or </em><em>"F"</em>) – memory layout for the array. Default: <codeclass="docutils literal notranslate"><spanclass="pre">"C"</span></code></p></li>
835
835
<li><p><strong>device</strong> (<em>optional</em>) – array API concept of device where the output array
0 commit comments