Repository navigation
CUDA: NumPy and string dtypes for local and shared arrays - #6879
Merged
Merged
Conversation
Issue numba#5901 identified that at some point local arrays would only accept Numba types for their dtype. It appears that they now accept NumPy and string dtypes. Since this now seems to work, this commit adds tests for passing string and NumPy types as dtypes to both local and shared array constructors. Fixes numba#5901.
stuartarchibald
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the patch, two minor things to resolve else looks good.
| @skip_on_cudasim("Can't check typing in simulator") | ||
| def test_invalid_string_dtype(self): | ||
| # Check that strings of invalid dtypes cause a typing error | ||
| with self.assertRaises(TypingError): |
Contributor
There was a problem hiding this comment.
Perhaps check the error message string?
| @skip_on_cudasim("Can't check typing in simulator") | ||
| def test_invalid_string_dtype(self): | ||
| # Check that strings of invalid dtypes cause a typing error | ||
| with self.assertRaises(TypingError): |
Contributor
There was a problem hiding this comment.
Perhaps check the error message string?
From PR numba#6879 feedback.
stuartarchibald
approved these changes
Apr 14, 2021
stuartarchibald
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the patch and fixes.
Contributor
|
Buildfarm ID: |
Contributor
Passed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #5901 identified that at some point local arrays would only accept Numba types for their dtype. It appears that they now accept NumPy and string dtypes.
Since this now seems to work, this commit adds tests for passing string and NumPy types as dtypes to both local and shared array constructors.
Fixes #5901.