[python-arrayfire] 213/250: Adding is_owner()
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Mar 28 22:59:50 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/master
in repository python-arrayfire.
commit 11612e896453ad61fcbb711779816e7437c463bf
Author: Filipe Maia <filipe.c.maia at gmail.com>
Date: Sun Feb 14 00:13:50 2016 +0100
Adding is_owner()
---
arrayfire/array.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arrayfire/array.py b/arrayfire/array.py
index e724977..4e98322 100644
--- a/arrayfire/array.py
+++ b/arrayfire/array.py
@@ -650,6 +650,14 @@ class Array(BaseArray):
safe_call(backend.get().af_is_linear(ct.pointer(res), self.arr))
return res.value
+ def is_owner(self):
+ """
+ Check if the array owns the raw pointer or is a derived array.
+ """
+ res = ct.c_bool(False)
+ safe_call(backend.get().af_is_owner(ct.pointer(res), self.arr))
+ return res.value
+
def __add__(self, other):
"""
Return self + other.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-arrayfire.git
More information about the debian-science-commits
mailing list