Skip to content

Commit c06153d

Browse files
committed
Display the print expression if possible
1 parent 433ba7a commit c06153d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arrayfire/array.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,4 +289,7 @@ def __nonzero__(self):
289289
# return self
290290

291291
def print_array(a):
292+
expr = inspect.stack()[1][-2]
293+
if (expr is not None):
294+
print('%s' % expr[0].split('print_array(')[1][:-2])
292295
safe_call(clib.af_print_array(a.arr))

0 commit comments

Comments
 (0)