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
832
832
<codeclass="docutils literal notranslate"><spanclass="pre">__sycl_usm_array_interface__</span></code> protocol, an instance
833
-
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
833
+
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
834
834
protocol, a Python scalar, or a (possibly nested) sequence of
835
835
Python scalars.</p></li>
836
836
<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
835
835
is returned.</p></li>
836
836
<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
837
-
<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>
837
+
<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>
838
838
<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.
839
839
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>
831
831
<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>
841
841
<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>
842
842
<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.
893
893
If it resides in a USM allocation on a SYCL device, the
894
894
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
895
-
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
895
+
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
0 commit comments