Skip to content

Sanitize shapes in ndarray's constructor#496

Merged
magnatelee merged 4 commits intonv-legate:branch-22.07from
magnatelee:sanitize-shape
Aug 2, 2022
Merged

Sanitize shapes in ndarray's constructor#496
magnatelee merged 4 commits intonv-legate:branch-22.07from
magnatelee:sanitize-shape

Conversation

@magnatelee
Copy link
Contributor

Fixes #493

@magnatelee magnatelee requested a review from manopapad August 2, 2022 05:51
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
XiaLuNV pushed a commit to XiaLuNV/cunumeric that referenced this pull request Dec 13, 2024
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