Skip to content

DOC: AI generated examples for ma.reshape - #26830

Merged
charris merged 1 commit into
numpy:mainfrom
otieno-juma:ai-examples-ma-reshape
Jul 22, 2024
Merged

charris merged 1 commit into
numpy:mainfrom
otieno-juma:ai-examples-ma-reshape

Conversation

@otieno-juma

Copy link
Copy Markdown
Contributor

I used AI Llama 3 to help create these.
@bmwoodruff and I reviewed them.
[skip actions] [skip azp] [skip cirrus]

reshape fuction pic

@eagunn

eagunn commented Jul 4, 2024

Copy link
Copy Markdown
Contributor

@otieno-juma Compared to your example code for #26827, I had a much harder time parsing this example code. I think it is because you do not assign the results of the reshape to a variable and then explicitly have that variable print out. That is, your examples looks like:

    >>> a = np.ma.array([1, 2, 3, 4])
    >>> np.ma.reshape(a, (2, 2))
    masked_array(
      data=[[1, 2],
            [3, 4]],
      mask=False,
      fill_value=999999)

and I think they would be easier to understand if they looked like:

    >>> a = np.ma.array([1, 2, 3, 4])
    >>> x = np.ma.reshape(a, (2, 2))
    >>> x
    masked_array(
      data=[[1, 2],
            [3, 4]],
      mask=False,
      fill_value=999999)

@otieno-juma

Copy link
Copy Markdown
Contributor Author

Thank you very much, @eagunn, for the feedback. We will improve our prompts to enhance those edges.

@rgommers
rgommers marked this pull request as draft July 7, 2024 07:59
@rgommers

rgommers commented Jul 7, 2024

Copy link
Copy Markdown
Member

Converting to draft pending review of the first such PR: gh-26827.

@charris

charris commented Jul 19, 2024

Copy link
Copy Markdown
Member

@otieno-juma Could you rebase this and the other pending PRs?

I used AI Llama 3 to help create these.
@bmwoodruff and I reviewed them.
[skip azp] [skip cirrus]
@otieno-juma
otieno-juma force-pushed the ai-examples-ma-reshape branch from 9f2db64 to 267e44c Compare July 22, 2024 13:35
@otieno-juma

Copy link
Copy Markdown
Contributor Author

@bmwoodruff, All the checks have passed. could you please review it?

@bmwoodruff

Copy link
Copy Markdown
Member

I ran the tests locally on my machine. Looks good. @charris, this should be ready for you to review. @otieno-juma , you can remove the draft status.

@otieno-juma
otieno-juma marked this pull request as ready for review July 22, 2024 16:04
@charris
charris merged commit 28505a9 into numpy:main Jul 22, 2024
@charris

charris commented Jul 22, 2024

Copy link
Copy Markdown
Member

Thanks @otieno-juma . Was there a response to @eagunn ? I didn't have a problem parsing the result, just wondering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants