Skip to content

DOC: adding examples to any method of multi-dimensional array #24010

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

Closed
wants to merge 11 commits into from

Conversation

MohitKumar020291
Copy link
Contributor

@MohitKumar020291 MohitKumar020291 commented Jun 21, 2023

This PR solves issue(#22266) of missing examples of any method in fromnumeric.py by adding examples. These examples have a 3D(3x2) array example, with; without axis, axis=0, axis=1 and axis=2.
Other examples are about use of different datatypes:

  1. Integer, float and mixed 2D array.
  2. int to bool conversion of 2D array(3x3). This example will show how any method works with 0 and 1.

@seberg seberg changed the title adding examples to any function of multi-dimensional array DOC: adding examples to any function of multi-dimensional array Jun 21, 2023
@MohitKumar020291 MohitKumar020291 changed the title DOC: adding examples to any function of multi-dimensional array DOC: adding examples to any method of multi-dimensional array Jun 21, 2023
@MohitKumar020291
Copy link
Contributor Author

Thanks @seberg for changing the title.

@charris charris changed the title DOC: adding examples to any method of multi-dimensional array DOC: adding examples to any method of multi-dimensional array Jun 21, 2023
MohitKumar020291 and others added 5 commits June 21, 2023 23:45
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Added examples of 2D(2x3) array.
Added another datatype boolean of 2D array to enhance the understanding of user about any method in different datatypes.
Lint problem fixed.
@MohitKumar020291
Copy link
Contributor Author

@rossbar changes are done. Thanks for help.

@rossbar
Copy link
Contributor

rossbar commented Jun 27, 2023

changes are done. Thanks for help.

@MohitKumar020291 it doesn't look like the docstring examples you have added have been simplified; in fact, they seem to have grown! In it's current state, I don't think the proposed additions are an improvement as they tend (IMO) to dilute the useful information. I'd be +1 on adding an example which demonstrates the use of axis per my suggestion above, but I'm -1 on adding the current changes.

@MohitKumar020291
Copy link
Contributor Author

@rossbar please look at these changes.

Copy link
Contributor

@linus-md linus-md left a comment

Choose a reason for hiding this comment

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

Example 2 LGTM

@mdhaber
Copy link
Contributor

mdhaber commented Dec 31, 2023

Resolved merge conflicts. Couldn't push to this branch, so I opened gh-25511, retaining the original commits, so this can be closed.

@mdhaber mdhaber closed this Dec 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

5 participants