Skip to content
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

Improve documentation in diamond_cutting.py #39844

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

DaveWitteMorris
Copy link
Member

@DaveWitteMorris DaveWitteMorris commented Apr 1, 2025

The docstring of the diamond_cutting method of a lattice (in src/sage/modules/diamond_cutting.py) states that the parameter C is the radius that will be used in the cutting algorithm, but C is actually the square of the radius. (This problem was mentioned in a comment on #37086.) We correct this misstatement and also provide some other minor improvements to the documentation of this method and the jacobi method in the same file. This includes adding a relevant reference.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

Copy link

github-actions bot commented Apr 1, 2025

Documentation preview for this PR (built with commit 69e9011; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Copy link
Collaborator

@tscrim tscrim left a comment

Choose a reason for hiding this comment

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

LGTM. Although I would probably put the algorithm before the examples, but that's me. If you want to do that, please go ahead. Otherwise, you can leave the positive review in place.

@DaveWitteMorris
Copy link
Member Author

You're right. A look at the sagemath codebase shows that ALGORITHM is usually before EXAMPLES. I'll make the change.

@tscrim
Copy link
Collaborator

tscrim commented Apr 2, 2025

Once done, you can reset the positive review.

@DaveWitteMorris
Copy link
Member Author

Thanks! I made the change and reset to positive review.

vbraun pushed a commit to vbraun/sage that referenced this pull request Apr 7, 2025
sagemathgh-39844: Improve documentation in diamond_cutting.py
    
The docstring of the `diamond_cutting` method of a lattice (in
`src/sage/modules/diamond_cutting.py`) states that the parameter `C` is
the radius that will be used in the cutting algorithm, but `C` is
actually the *square* of the radius. (This problem was mentioned in a
comment on sagemath#37086.) We correct this misstatement and also provide some
other minor improvements to the documentation of this method and the
`jacobi` method in the same file. This includes adding a relevant
reference.


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39844
Reported by: DaveWitteMorris
Reviewer(s): Travis Scrimshaw
vbraun pushed a commit to vbraun/sage that referenced this pull request Apr 10, 2025
sagemathgh-39844: Improve documentation in diamond_cutting.py
    
The docstring of the `diamond_cutting` method of a lattice (in
`src/sage/modules/diamond_cutting.py`) states that the parameter `C` is
the radius that will be used in the cutting algorithm, but `C` is
actually the *square* of the radius. (This problem was mentioned in a
comment on sagemath#37086.) We correct this misstatement and also provide some
other minor improvements to the documentation of this method and the
`jacobi` method in the same file. This includes adding a relevant
reference.


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39844
Reported by: DaveWitteMorris
Reviewer(s): Travis Scrimshaw
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.

2 participants