Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Add annotation for empty and emtpy_like #85

Merged
merged 2 commits into from
Jun 5, 2020
Merged

Conversation

unnonouno
Copy link
Contributor

I added empty and empty_like based on the similar function ones and ones_like.

Copy link
Member

@person142 person142 left a comment

Choose a reason for hiding this comment

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

Thanks @unnonouno! Just one thing about ndarray[int] where the existing code leads one astray.

order: str = ...,
subok: bool = ...,
shape: Optional[_ShapeLike] = ...,
) -> ndarray[int]: ...
Copy link
Member

Choose a reason for hiding this comment

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

Hm the ndarray[int] in ones_like is actually a mistake (we haven't made ndarray generic over dtype yet). Mind removing the [int] part from empty_like and (while we're here) ones_like?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, sorry. I'll fix both.

@person142 person142 merged commit 23e88e0 into numpy:master Jun 5, 2020
@unnonouno unnonouno deleted the empty branch June 5, 2020 02:13
@unnonouno
Copy link
Contributor Author

Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants