-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Remove some extra spaces in docstrings/comments. #11592
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,9 +76,8 @@ def __init__(self, triangulation, z, trifinder=None): | |
Returns | ||
------- | ||
z : np.ma.array | ||
Masked array of the same shape as *x* and *y* ; values | ||
corresponding to (*x*, *y*) points outside of the triangulation | ||
are masked out. | ||
Masked array of the same shape as *x* and *y*; values corresponding | ||
to (*x*, *y*) points outside of the triangulation are masked out. | ||
|
||
""" | ||
|
||
|
@@ -95,7 +94,7 @@ def __init__(self, triangulation, z, trifinder=None): | |
Returns | ||
------- | ||
dzdx, dzdy : np.ma.array | ||
2 masked arrays of the same shape as *x* and *y* ; values | ||
2 masked arrays of the same shape as *x* and *y*; values | ||
corresponding to (x,y) points outside of the triangulation | ||
are masked out. | ||
The first returned array contains the values of | ||
|
@@ -466,7 +465,7 @@ def _compute_dof(self, kind, dz=None): | |
Choice of the _DOF_estimator subclass to perform the gradient | ||
estimation. | ||
dz: tuple of array_likes (dzdx, dzdy), optional | ||
Used only if *kind=user ; in this case passed to the | ||
Used only if *kind*=user; in this case passed to the | ||
:class:`_DOF_estimator_user`. | ||
|
||
Returns | ||
|
@@ -486,7 +485,7 @@ def _compute_dof(self, kind, dz=None): | |
elif kind == 'min_E': | ||
TE = _DOF_estimator_min_E(self) | ||
else: | ||
raise ValueError("CubicTriInterpolator *kind* proposed: {0} ; " | ||
raise ValueError("CubicTriInterpolator *kind* proposed: {0}; " | ||
"should be one of: " | ||
"'user', 'geom', 'min_E'".format(kind)) | ||
return TE.compute_dof_from_df() | ||
|
@@ -919,7 +918,7 @@ def get_Hrot_from_J(self, J, return_area=False): | |
to global coordinates. | ||
if *return_area* is True, returns also the triangle area (0.5*det(J)) | ||
""" | ||
# Here we try to deal with the simplest colinear cases ; a null | ||
# Here we try to deal with the simplest colinear cases; a null | ||
# energy and area is imposed. | ||
J_inv = _safe_inv22_vectorized(J) | ||
Ji00 = J_inv[:, 0, 0] | ||
|
@@ -1138,7 +1137,7 @@ def compute_geom_weights(self): | |
# In the below formula we could take modulo 2. but | ||
# modulo 1. is safer regarding round-off errors (flat triangles). | ||
angle = np.abs(np.mod((alpha2-alpha1) / np.pi, 1.)) | ||
# Weight proportional to angle up np.pi/2 ; null weight for | ||
# Weight proportional to angle up np.pi/2; null weight for | ||
# degenerated cases 0. and np.pi (Note that `angle` is normalized | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Being there "degenerated cases 0 and np.pi (note that |
||
# by np.pi) | ||
weights[:, ipt] = 0.5 - np.abs(angle-0.5) | ||
|
@@ -1201,9 +1200,9 @@ def compute_dz(self): | |
J, eccs, triangles, Uc) | ||
|
||
# Building sparse matrix and solving minimization problem | ||
# We could use scipy.sparse direct solver ; however to avoid this | ||
# We could use scipy.sparse direct solver; however to avoid this | ||
# external dependency an implementation of a simple PCG solver with | ||
# a simplendiagonal Jocabi preconditioner is implemented. | ||
# a simple diagonal Jacobi preconditioner is implemented. | ||
tol = 1.e-10 | ||
n_dof = Ff.shape[0] | ||
Kff_coo = _Sparse_Matrix_coo(Kff_vals, Kff_rows, Kff_cols, | ||
|
@@ -1435,7 +1434,7 @@ def _safe_inv22_vectorized(M): | |
prod1 = M[:, 0, 0]*M[:, 1, 1] | ||
delta = prod1 - M[:, 0, 1]*M[:, 1, 0] | ||
|
||
# We set delta_inv to 0. in case of a rank deficient matrix ; a | ||
# We set delta_inv to 0. in case of a rank deficient matrix; a | ||
# rank-deficient input matrix *M* will lead to a null matrix in output | ||
rank2 = (np.abs(delta) > 1e-8*np.abs(prod1)) | ||
if np.all(rank2): | ||
|
@@ -1455,7 +1454,7 @@ def _safe_inv22_vectorized(M): | |
|
||
def _pseudo_inv22sym_vectorized(M): | ||
""" | ||
Inversion of arrays of (2,2) SYMMETRIC matrices ; returns the | ||
Inversion of arrays of (2,2) SYMMETRIC matrices; returns the | ||
(Moore-Penrose) pseudo-inverse for rank-deficient matrices. | ||
|
||
In case M is of rank 1, we have M = trace(M) x P where P is the orthogonal | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Add a final period ? As you seem to have added it to other docstrings (at least one) 😈.