-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Updating backend docstrings #2213
Updating backend docstrings #2213
Conversation
Transurgeon seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Benchmarks that have stayed the same:
|
Great work adding these docstrings! Having docstrings sets a good pattern for future developers. |
Co-authored-by: Philipp Schiele <44360364+phschiele@users.noreply.github.com>
…surgeon/cvxpy into updating-backend-docstrings
cvxpy/lin_ops/canon_backend.py
Outdated
[0 0 2 0], | ||
[0 0 0 2]]] | ||
|
||
However computing kron(x, a) directly gives us: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a comparison of normal kron(x, a) to show why reordering is necessary. I am not sure if this is a great idea as it makes the docstring very lengthy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should move this to the tests and add a pointer here (which we should do in general).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll try to make some additional changes now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good from my side.
Benchmarks are failing because of a new asv release. Merging here as it only added docs. |
Description
This PR attempts to add docstrings to all functions in the canonicalization backend. Notably, this includes the new NumPy backend that has recently been added in #2186 . This branch is WIP but a good chunk has already been completed, so a first review isn't out of the question. I also found a neat way to refactor indexing in the kron functions.
P.S: Adding non-trivial docstrings is actually kind of challenging, please bare with all the redundancy and reiterations that I may have introduced.
Type of change
Contribution checklist