Skip to content
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

Sanitize shapes in ndarray's constructor #496

Merged
merged 4 commits into from
Aug 2, 2022

Conversation

magnatelee
Copy link
Contributor

Fixes #493

@@ -569,17 +567,15 @@ def find_or_create_array_thunk(

def create_empty_thunk(
self,
shape: NdShapeLike,
shape: tuple[int, ...],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think NdShape makes sense here.

Copy link
Contributor

@manopapad manopapad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor typing suggestion, otherwise looks good.

@magnatelee magnatelee merged commit 7fa393a into nv-legate:branch-22.07 Aug 2, 2022
@magnatelee magnatelee deleted the sanitize-shape branch August 2, 2022 22:47
sbak5 pushed a commit to sbak5/cunumeric that referenced this pull request Aug 17, 2022
* Sanitize shape arguments in the ndarray constructor

* Sanitize numpy ndarrays correctly

* Some test cases passing ndarrays as shapes

* Use NdShape instead of the raw tuple type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crash using result from np.sum
2 participants