Skip to content

Commit 4bf151c

Browse files
author
Diptorup Deb
authored
Merge pull request #944 from chudur-budur/bug/indexers
Fix bug with indexers.py, errors need to be 'raised'
2 parents 5d311b0 + 13970fb commit 4bf151c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

numba_dpex/core/kernel_interface/indexers.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,20 @@ def __init__(self, global_size, local_size):
103103
elif isinstance(global_size, Iterable):
104104
self._global_range = Range(*global_size)
105105
else:
106-
TypeError("Unknwon argument type for NdRange global_size.")
106+
raise TypeError(
107+
"Unknwon argument type for NdRange global_size, "
108+
+ "must be of either type Range or Iterable of int's."
109+
)
107110

108111
if isinstance(local_size, Range):
109112
self._local_range = local_size
110113
elif isinstance(local_size, Iterable):
111114
self._local_range = Range(*local_size)
112115
else:
113-
TypeError("Unknwon argument type for NdRange local_size.")
116+
raise TypeError(
117+
"Unknwon argument type for NdRange local_size, "
118+
+ "must be of either type Range or Iterable of int's."
119+
)
114120

115121
@property
116122
def global_range(self):

0 commit comments

Comments
 (0)