[python-arrayfire] 87/250: Stop __repr__ from directly printing

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Mar 28 22:59:35 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 1e09d86c00c87ed166ca12e383d6634c0b1a0db0
Author: Filipe Maia <filipe.c.maia at gmail.com>
Date:   Tue Sep 1 17:47:05 2015 +0200

    Stop __repr__ from directly printing
---
 arrayfire/array.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arrayfire/array.py b/arrayfire/array.py
index 99967cf..81ff5e3 100644
--- a/arrayfire/array.py
+++ b/arrayfire/array.py
@@ -496,7 +496,9 @@ class Array(BaseArray):
         return ctype_to_lists(ct_array, len(shape) - 1, shape)
 
     def __repr__(self):
-        safe_call(backend.get().af_print_array(self.arr))
+        # Having __repr__ directly print things is a bad idea
+        # Placeholder for when af_array_to_string is available
+        # safe_call(backend.get().af_array_to_string...
         return '%s of dimensions %s' % (type(self), self.dims())
 
     def __array__(self):

-- 
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