-
Notifications
You must be signed in to change notification settings - Fork 26
Block Diagonal Class #144
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
Block Diagonal Class #144
Conversation
junchaoxia
left a comment
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.
Overall it looks good. Some discussions can be done to make some changes before merging.
|
@junchaoxia I think most of the comments have been addressed if you want to take another peek at the latest. I tried to stack the commits closer to how you discussed as well. Thanks. |
02ed215 to
3c78752
Compare
|
|
janden
left a comment
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.
Some things to discuss here. Overall looks very good.
One thing to note: the PR is quite large, which makes reviewing and discussing more difficult (rule of thumb we try to use is roughly one day of work or 800 lines). Large PRs are of course unavoidable sometimes (many moving parts that need to be changed to avoid breaking things). For this type of feature, it might be good to have one PR to add the basic functionality (say without operator overloading), another to extend that functionality, and then another where the functionality is integrated into the rest of the project and the old code is removed.
mostly docstring formatting and readability some minor code improvements
1ef0e80 to
ac08f67
Compare
|
@janden I got the first batch of easy stuff. I will go back to the remaining items Monday. I have a better idea what you are looking for regarding style etc now. I got a little rusty at PPPL :). Have a nice weekend. |
also cleanup whitespace since I was changing doctrings
6843cc7 to
91e3718
Compare
d700e08 to
ebbf0ed
Compare
janden
left a comment
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.
Looks good to me. Just one or two small things.
garrettwrong
left a comment
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.
Following our discussion I implemented the suggested changes. Will merge in once CI pipeline completes.
also cleanup some pep8 whitespace complaints
a859303 to
c18ce12
Compare
|
@junchaoxia When you get a second can you review/accept? This way I can avoid using admin overide to merge. Thanks |
For my first pull request with this group, I started with something a manageable size.
A BlockDiagonal class replaces blk_diag_* functions. This includes:
In the future, it is possible to optimize this code several ways. One way is to parallelize the block computations in python. Alternatively, the code was tested and is able to be Cython-ized, but this requires some ugly adjustments. Such optimizations should be easier now that we are consistently using the class (afaict).
There are still a few
todoitems I will complete, and I would like to review the code myself with fresh eyes as well, but I think it is close enough that we can go through the motions of a review.Closes #111