We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bb9061 commit b726e89Copy full SHA for b726e89
arrayfire/array.py
@@ -491,6 +491,19 @@ def raw_ptr(self):
491
backend.get().af_get_raw_ptr(ct.pointer(ptr), self.arr)
492
return ptr.value
493
494
+ def offset(self):
495
+ """
496
+ Return the offset, of the first element relative to the raw pointer.
497
+
498
+ Returns
499
+ ------
500
+ offset : int
501
+ The offset in number of elements
502
503
+ offset = ct.c_longlong(0)
504
+ safe_call(backend.get().af_get_offset(ct.pointer(offset), self.arr))
505
+ return offset.value
506
507
def strides(self):
508
"""
509
Return the distance in bytes between consecutive elements for each dimension.
0 commit comments