[python-arrayfire] 22/250: Display the print expression if possible
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Mar 28 22:59:26 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 c06153d3aee8e83c0224ecbd2a0bb807b8cd422e
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date: Mon Jun 22 13:12:12 2015 -0400
Display the print expression if possible
---
arrayfire/array.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arrayfire/array.py b/arrayfire/array.py
index 170257c..99e1e38 100644
--- a/arrayfire/array.py
+++ b/arrayfire/array.py
@@ -289,4 +289,7 @@ class array(object):
# return self
def print_array(a):
+ expr = inspect.stack()[1][-2]
+ if (expr is not None):
+ print('%s' % expr[0].split('print_array(')[1][:-2])
safe_call(clib.af_print_array(a.arr))
--
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