[python-arrayfire] 212/250: Adding is_linear()

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Mar 28 22:59:49 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 ed12077e6f473c5a3b03be31732466ee6e55bc52
Author: Filipe Maia <filipe.c.maia at gmail.com>
Date:   Sun Feb 14 00:11:42 2016 +0100

    Adding is_linear()
---
 arrayfire/array.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arrayfire/array.py b/arrayfire/array.py
index 350c2a1..e724977 100644
--- a/arrayfire/array.py
+++ b/arrayfire/array.py
@@ -642,6 +642,14 @@ class Array(BaseArray):
         safe_call(backend.get().af_is_bool(ct.pointer(res), self.arr))
         return res.value
 
+    def is_linear(self):
+        """
+        Check if all elements of the array are contiguous.
+        """
+        res = ct.c_bool(False)
+        safe_call(backend.get().af_is_linear(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