Skip to content

Commit

Permalink
TaggableCLArray: better __repr__
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener authored and inducer committed Jun 27, 2024
1 parent a081f39 commit dcd7d14
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arraycontext/impl/pyopencl/taggable_cl_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ def __init__(self, cq, shape, dtype, order="C", allocator=None,
self.tags = tags
self.axes = axes

def __repr__(self) -> str:
return (f"{type(self).__name__}(shape={self.shape}, dtype={self.dtype}, "
f"tags={self.tags}, axes={self.axes})")

def copy(self, queue=cla._copy_queue):
ary = super().copy(queue=queue)
return type(self)(None, tags=self.tags, axes=self.axes,
Expand Down

0 comments on commit dcd7d14

Please sign in to comment.