Skip to content

Commit

Permalink
Use class name in the tuple type name
Browse files Browse the repository at this point in the history
  • Loading branch information
sklam committed Dec 18, 2019
1 parent 91aa3e5 commit 90956ff
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions numba/types/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ class UniTuple(BaseAnonymousTuple, _HomogeneousTuple, Sequence):
def __init__(self, dtype, count):
self.dtype = dtype
self.count = count
name = "UniTuple(%s x %d)" % (dtype, count)
name = "%s(%s x %d)" % (
self.__class__.__name__, dtype, count,
)
super(UniTuple, self).__init__(name)

@property
Expand Down Expand Up @@ -276,7 +278,10 @@ def __init__(self, types):
self.types = tuple(types)
self.count = len(self.types)
self.dtype = UnionType(types)
name = "Tuple(%s)" % ', '.join(str(i) for i in self.types)
name = "%s(%s)" % (
self.__class__.__name__,
', '.join(str(i) for i in self.types),
)
super(Tuple, self).__init__(name)

@property
Expand Down

0 comments on commit 90956ff

Please sign in to comment.