-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Simplify curvilinear grid examples. #20626
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
Conversation
def tr(x, y): return x, y - x | ||
def inv_tr(x, y): return x, y + x |
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.
Style: I don't think we should put function bodies on the same line (and I'm surprised flake8 doesn't complain). Either give it proper line breaks (preferred), or inline them into `GridHelperCurveLinear using lambdas.
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.
One liners can be written together, see https://www.python.org/dev/peps/pep-0008/#blank-lines / PyCQA/pycodestyle#823. I can still spread things out if you prefer, just let me know.
Test failure is real:
|
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.
Test fails.
Since 8840d6e we ensure that `x` and `y` passed to `tr` and `inv_tr` are already arrays (see the definition of `_UserTransform2D.transform_non_affine`), so we don't need additional casting-to-arrays.
Indeed, fixed. |
Since 8840d6e we ensure that
x
andy
passed totr
andinv_tr
are already arrays (see the definition of
_UserTransform2D.transform_non_affine
), so we don't need additionalcasting-to-arrays.
PR Summary
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).