@@ -116,31 +116,31 @@ def from_numpy(np_ary, /, *, device=None, usm_type="device", sycl_queue=None):
116
116
:class:`numpy.ndarray`.
117
117
118
118
Args:
119
- arg (array-like): An instance of input convertible to
120
- :class:`numpy.ndarray`
119
+ arg:
120
+ Input convertible to :class:`numpy.ndarray`
121
121
device (object): array API specification of device where the
122
122
output array is created. Device can be specified by a
123
123
a filter selector string, an instance of
124
124
:class:`dpctl.SyclDevice`, an instance of
125
125
:class:`dpctl.SyclQueue`, or an instance of
126
- :class:`dpctl.tensor.Device`. If the value is `None`,
126
+ :class:`dpctl.tensor.Device`. If the value is `` None` `,
127
127
returned array is created on the default-selected device.
128
- Default: `None`.
128
+ Default: `` None``
129
129
usm_type (str): The requested USM allocation type for the
130
- output array. Recognized values are `"device"`, `"shared" `,
131
- or `"host"`.
130
+ output array. Recognized values are `` "device"``,
131
+ ``"shared"``, or `` "host"``
132
132
sycl_queue (:class:`dpctl.SyclQueue`, optional):
133
133
A SYCL queue that determines output array allocation device
134
134
as well as execution placement of data movement operations.
135
- The `device` and `sycl_queue` arguments
135
+ The `` device`` and `` sycl_queue` ` arguments
136
136
are equivalent. Only one of them should be specified. If both
137
137
are provided, they must be consistent and result in using the
138
- same execution queue. Default: `None`.
138
+ same execution queue. Default: `` None``
139
139
140
140
The returned array has the same shape, and the same data type kind.
141
141
If the device does not support the data type of input array, a
142
142
closest support data type of the same kind may be returned, e.g.
143
- input array of type `float16` may be upcast to `float32` if the
143
+ input array of type `` float16`` may be upcast to `` float32` ` if the
144
144
target device does not support 16-bit floating point type.
145
145
"""
146
146
q = normalize_queue_device (sycl_queue = sycl_queue , device = device )
@@ -151,7 +151,7 @@ def to_numpy(usm_ary, /):
151
151
"""
152
152
to_numpy(usm_ary)
153
153
154
- Copies content of :class:`dpctl.tensor.usm_ndarray` instance `usm_ary`
154
+ Copies content of :class:`dpctl.tensor.usm_ndarray` instance `` usm_ary` `
155
155
into :class:`numpy.ndarray` instance of the same shape and same data type.
156
156
157
157
Args:
@@ -160,7 +160,7 @@ def to_numpy(usm_ary, /):
160
160
Returns:
161
161
:class:`numpy.ndarray`:
162
162
An instance of :class:`numpy.ndarray` populated with content of
163
- `usm_ary`
163
+ `` usm_ary` `
164
164
"""
165
165
return _copy_to_numpy (usm_ary )
166
166
@@ -169,7 +169,7 @@ def asnumpy(usm_ary):
169
169
"""
170
170
asnumpy(usm_ary)
171
171
172
- Copies content of :class:`dpctl.tensor.usm_ndarray` instance `usm_ary`
172
+ Copies content of :class:`dpctl.tensor.usm_ndarray` instance `` usm_ary` `
173
173
into :class:`numpy.ndarray` instance of the same shape and same data
174
174
type.
175
175
@@ -179,7 +179,7 @@ def asnumpy(usm_ary):
179
179
Returns:
180
180
:class:`numpy.ndarray`:
181
181
An instance of :class:`numpy.ndarray` populated with content
182
- of `usm_ary`
182
+ of `` usm_ary` `
183
183
"""
184
184
return _copy_to_numpy (usm_ary )
185
185
@@ -508,22 +508,28 @@ def copy(usm_ary, /, *, order="K"):
508
508
509
509
Args:
510
510
ary (usm_ndarray):
511
- Input array.
512
- order ({ "C", "F", "A", "K"} , optional):
513
- Controls the memory layout of the output array.
511
+ Input array
512
+ order (`` "C"``, `` "F"``, `` "A"``, `` "K"`` , optional):
513
+ Controls the memory layout of the output array
514
514
Returns:
515
515
usm_ndarray:
516
516
A copy of the input array.
517
517
518
- Memory layout of the copy is controlled by `order` keyword,
519
- following NumPy's conventions. The `order` keywords can be
518
+ Memory layout of the copy is controlled by `` order` ` keyword,
519
+ following NumPy's conventions. The `` order` ` keywords can be
520
520
one of the following:
521
521
522
- - "C": C-contiguous memory layout
523
- - "F": Fortran-contiguous memory layout
524
- - "A": Fortran-contiguous if the input array is also Fortran-contiguous,
525
- otherwise C-contiguous
526
- - "K": match the layout of `usm_ary` as closely as possible.
522
+ .. list-table::
523
+
524
+ * - ``"C"``
525
+ - C-contiguous memory layout
526
+ * - ``"F"``
527
+ - Fortran-contiguous memory layout
528
+ * - ``"A"``
529
+ - Fortran-contiguous if the input array is also Fortran-contiguous,
530
+ otherwise C-contiguous
531
+ * - ``"K"``
532
+ - match the layout of ``usm_ary`` as closely as possible.
527
533
528
534
"""
529
535
if len (order ) == 0 or order [0 ] not in "KkAaCcFf" :
0 commit comments