Skip to content

Commit 1e09d86

Browse files
committed
Stop __repr__ from directly printing
1 parent 31e023a commit 1e09d86

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arrayfire/array.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,9 @@ def to_list(self, row_major=False):
496496
return ctype_to_lists(ct_array, len(shape) - 1, shape)
497497

498498
def __repr__(self):
499-
safe_call(backend.get().af_print_array(self.arr))
499+
# Having __repr__ directly print things is a bad idea
500+
# Placeholder for when af_array_to_string is available
501+
# safe_call(backend.get().af_array_to_string...
500502
return '%s of dimensions %s' % (type(self), self.dims())
501503

502504
def __array__(self):

0 commit comments

Comments
 (0)