8000 DOC: add examples for np.ma.convolve by infinity-void6 · Pull Request #27450 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

DOC: add examples for np.ma.convolve #27450

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

infinity-void6
Copy link

As a part of 2024 Pycon India Blr Devsprint, I took this issue: #21351 and added an example for the docstring of the method np.ma.convolve with the help of @seberg

>>> from numpy.ma import masked_equal, convolve
>>> a = masked_equal(np.arange(5), 2)
>>> b = np.array([1, 1])
>>> convolve(a, b)
Copy link
Member

Choose a reason for hiding this comment

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

Sorry for the late comment. This looks fine, I think most of the code just uses np.ma.<function> without explicit import, so maybe that would be clearer?

One other suggestion I have would be to print out a (just with >>> a), since I am not sure that it is easy for users to grasp without seeing it.

@charris charris changed the title added examples in docstring for np.ma.convolve DOC: add examples for np.ma.convolve Oct 3, 2024
@melissawm
Copy link
Member

Hi @infinity-void6 - are you interested in finishing this up?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Pending authors' response
Development

Successfully merging this pull request may close these issues.

3 participants
0