Skip to content

Fix bug with indexers.py, errors need to be 'raised' #944

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions numba_dpex/core/kernel_interface/indexers.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,20 @@ def __init__(self, global_size, local_size):
elif isinstance(global_size, Iterable):
self._global_range = Range(*global_size)
else:
TypeError("Unknwon argument type for NdRange global_size.")
raise TypeError(
"Unknwon argument type for NdRange global_size, "
+ "must be of either type Range or Iterable of int's."
)

if isinstance(local_size, Range):
self._local_range = local_size
elif isinstance(local_size, Iterable):
self._local_range = Range(*local_size)
else:
TypeError("Unknwon argument type for NdRange local_size.")
raise TypeError(
"Unknwon argument type for NdRange local_size, "
+ "must be of either type Range or Iterable of int's."
)

@property
def global_range(self):
Expand Down