Skip to content

Conversation

@rcomer
Copy link
Contributor

@rcomer rcomer commented Aug 12, 2022

Implements ones_like, zeros_like and empty_like within dask.array.ma. I also looked at full_like, but that does not currently exist in numpy.ma, so I left it out for simplicity.

Note that until recently (numpy/numpy#19899), ones_like and zeros_like were missing from numpy.ma.core.__all__ and therefore did not appear in the numpy.ma namespace. So I am using numpy.ma.core directly.

@GPUtester
Copy link
Collaborator

Can one of the admins verify this patch?

Admins can comment ok to test to allow this one PR to run or add to allowlist to allow all future PRs from the same author to run.

@github-actions github-actions bot added the array label Aug 12, 2022
@ncclementi
Copy link
Member

add to allowlist

@rcomer rcomer force-pushed the masked-like-funcs branch from d09ee09 to cc1a7f3 Compare August 12, 2022 16:32
@rcomer
Copy link
Contributor Author

rcomer commented Aug 12, 2022

I forgot they would also need adding to the docs. Is it just a case of including them in https://github.com/dask/dask/blob/main/docs/source/array-api.rst?

@github-actions github-actions bot added the documentation Improve or add to documentation label Aug 16, 2022
Copy link
Member

@jsignell jsignell left a comment

Choose a reason for hiding this comment

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

This seems totally reasonable to me! Thanks for putting in this work @rcomer

@jsignell jsignell merged commit 0a7b58b into dask:main Aug 17, 2022
@rcomer
Copy link
Contributor Author

rcomer commented Aug 17, 2022

Thanks @jsignell!

@rcomer rcomer deleted the masked-like-funcs branch August 17, 2022 13:59
@pavithraes
Copy link
Member

@rcomer Hi! Thanks for working on this! We'll be highlighting this PR in a "release highlights" Twitter post. Would you be comfortable sharing your Twitter handle with me so we can tag you in it?

@rcomer
Copy link
Contributor Author

rcomer commented Aug 24, 2022

Thanks @pavithraes! I am flyingcomer on Twitter but not very active there. (I see you have already found me!)

@jakirkham jakirkham mentioned this pull request Aug 24, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

array documentation Improve or add to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mask preserving *_like functions

5 participants