Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC: Fix matrices image in Absolute Beginner's Guide #20110

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 2 commits into from

Conversation

MarsBarLee
Copy link
Contributor

Addresses #19912

Hi all, this is a correction to the image in the Absolute Beginner's Guide, section on Creating Matrices. The image does not align with the code.

This is the original image and code.

image
You can aggregate all the values in a matrix and you can aggregate them across columns or rows using the axis parameter:

data.max(axis=0)
array([5, 6])
data.max(axis=1)
array([2, 4, 6])

This is the fix.

np_matrix_aggregation_row
You can aggregate all the values in a matrix and you can aggregate them across columns or rows using the axis parameter:

data.max(axis=0)
array([5, 6])
data.max(axis=1)
array([2, 4, 6])

Please let me know if there's any mistakes in my corrections. Thank you!

in page Absolute Beginner's Guide, section on Creating Matrices
in page Absolute Beginner's Guide, section on Creating Matrices
@melissawm
Copy link
Member

This looks good - although I wonder if now we risk people confusing the maximum value by the maximum index in each axis... Maybe others have an opinion?

@MarsBarLee
Copy link
Contributor Author

MarsBarLee commented Oct 13, 2021

@melissawm I know there was some more discussion in #18524 about this image and other images in the Creating Matrices section earlier this year. For this fix, I focused on what I could understand just in the aggregation example, but maybe the section as a whole needs a re-vamp? EDIT: Actually the changes requested have already been made in #18524, so I think this image is the only change left.

@rossbar
Copy link
Contributor

rossbar commented Oct 14, 2021

This looks good - although I wonder if now we risk people confusing the maximum value by the maximum index in each axis...

I agree @melissawm , I think your analysis+suggestion in this comment is spot on. As I see it, there are two options:

  1. Update the first three images in the Creating matrices section (i.e. the two where the squares are blue and the one immediately following) and the code to use the data = np.array([[1, 2], [5, 3], [4, 6]]) array throughout as you've suggested, or
  2. Modify the data prior to the portion of the example illustrating the reductions w/ axis to match the figure.

The latter option might not flow as nicely, but it has the advantage of not requiring any changes to the existing static figures. I've pushed up a concrete example of what that might look like in #20115.

@melissawm
Copy link
Member

melissawm commented Oct 19, 2021

I think after the discussion and seeing @rossbar 's proposal, I'd vote for closing this and just fixing the code. However, you mentioned there was trouble finding the specific fonts to change this, maybe the way to re-create these images could be documented somehow?

@charris
Copy link
Member

charris commented Oct 22, 2021

@MarsBarLee I'm closing this in favor of #20115. Thanks for providing this option.

@charris charris closed this Oct 22, 2021
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.

4 participants