8000 DOC: Changed vdot docs as suggested by geetaakshata · Pull Request #26406 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

DOC: Changed vdot docs as suggested #26406

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

Merged
merged 4 commits into from
Oct 12, 2024
Merged

DOC: Changed vdot docs as suggested #26406

merged 4 commits into from
Oct 12, 2024

Conversation

geetaakshata
Copy link
Contributor
@geetaakshata geetaakshata commented May 9, 2024

Closes gh-26342

@rileyjmurray
Copy link

Thanks for the ping, @geetaakshata! Can you have the text "Frobenius inner product" link to https://en.wikipedia.org/wiki/Frobenius_inner_product? I'm not sure what syntax would be used to create the external link. You might need to look at source code for other NumPy web documentation to figure that out.

@ngoldbaum
Copy link
Member

Ah, the age-old question: how do you make a hyperlink in sphinx? Only the sages know 😜

Kidding but not really, it's the most common sphinx issue people run into. Relevant StackOverflow answer, which links to the ReStructuredText docs: https://stackoverflow.com/questions/17189038/generating-an-external-link-in-sphinx

@ngoldbaum
Copy link
Member

Also numpy's linter enforces a 79 character line limit, see the test results.

@charris charris changed the title #26342 - Changed vdot docs as suggested DOC: Changed vdot docs as suggested May 10, 2024
@mattip
Copy link
Member
mattip commented May 30, 2024

@geetaakshata could you relate to the review comments? You can add another commit to the current code:

  • reflow the text to be less than 80 columns. we are thinking of raising the limit to 88, but you have over 90
  • add the requested link

Note that using a non-unique branch like main for the PR is problematic, in the future start a PR off a new branch with something like git checkout -b my_new_branch

@mattip
Copy link
Member
mattip commented Jul 3, 2024

@geetaakshata is this still active?

@@ -842,18 +842,22 @@ def dot(a, b, out=None):

@array_function_from_c_func_and_dispatcher(_multiarray_umath.vdot)
def vdot(a, b):
"""
r"""
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably not needed after all.

@@ -894,7 +898,7 @@ def vdot(a, b):
>>> 1*4 + 4*1 + 5*2 + 6*2
30

"""
""" # noqa: E501
Copy link
Contributor
@mdhaber mdhaber Oct 12, 2024

Choose a reason for hiding this comment

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

Only needed for the URL. Perhaps Sphinx would allow a line break there, but I wasn't sure.

8000
@mdhaber
Copy link
Contributor
mdhaber commented Oct 12, 2024

@ngoldbaum @mattip I added a commit to address the comments, then realized I'd need to merge main to get CircleCI to run. Looks like I added an extra period, though. LMK if you'd want all this rebased or if it's OK to just squash merge (after committing the removal of the period).

macOS tests failure seems unrelated (same failure in gh-27544).

Co-authored-by: Matt Haberland <mhaberla@calpoly.edu>
@mattip mattip merged commit 83c34d5 into numpy:main Oct 12, 2024
4 checks passed
@mattip
Copy link
Member
mattip commented Oct 12, 2024

Thanks @geetaakshata and @mdhaber

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.

DOC: Change vdot docs to mention computing the standard inner product on a space of matrices
6 participants
0