From 12e9504514a7d661693b8ec4194bbf0d20ac5dfb Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sat, 27 May 2017 20:26:15 -0700 Subject: [PATCH] Add pudb stringification handler for arrays --- pyopencl/array.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyopencl/array.py b/pyopencl/array.py index f40cfbbc..9ee94a15 100644 --- a/pyopencl/array.py +++ b/pyopencl/array.py @@ -643,6 +643,9 @@ class Array(object): def __repr__(self): return repr(self.get()) + def safely_stringify_for_pudb(self): + return "cl.Array %s %s" % (self.dtype, self.shape) + def __hash__(self): raise TypeError("pyopencl arrays are not hashable.") -- GitLab