Skip to content

Commit 50f16f4

Browse files
populated docstrings of C-API functions of usmarray
1 parent b96a882 commit 50f16f4

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

dpctl/tensor/_usmarray.pyx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,36 +1137,35 @@ cdef usm_ndarray _zero_like(usm_ndarray ary):
11371137

11381138

11391139
cdef api char* UsmNDArray_GetData(usm_ndarray arr):
1140-
"""
1141-
"""
1140+
"""Get allocation pointer of zero index element of array """
11421141
return arr.get_data()
11431142

11441143

11451144
cdef api int UsmNDArray_GetNDim(usm_ndarray arr):
1146-
""""""
1145+
"""Get array rank: length of its shape"""
11471146
return arr.get_ndim()
11481147

11491148

11501149
cdef api Py_ssize_t* UsmNDArray_GetShape(usm_ndarray arr):
1151-
""" """
1150+
"""Get host pointer to shape vector"""
11521151
return arr.get_shape()
11531152

11541153

11551154
cdef api Py_ssize_t* UsmNDArray_GetStrides(usm_ndarray arr):
1156-
""" """
1155+
"""Get host pointer to strides vector"""
11571156
return arr.get_strides()
11581157

11591158

11601159
cdef api int UsmNDArray_GetTypenum(usm_ndarray arr):
1161-
""" """
1160+
"""Get type number for data type of array elements"""
11621161
return arr.get_typenum()
11631162

11641163

11651164
cdef api int UsmNDArray_GetFlags(usm_ndarray arr):
1166-
""" """
1165+
"""Get flags of array"""
11671166
return arr.get_flags()
11681167

11691168

11701169
cdef api c_dpctl.DPCTLSyclQueueRef UsmNDArray_GetQueueRef(usm_ndarray arr):
1171-
""" """
1170+
"""Get DPCTLSyclQueueRef for queue associated with the array"""
11721171
return arr.get_queue_ref()

0 commit comments

Comments
 (0)