-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Inserting center coordinates to ellipsoid #4096
base: main
Are you sure you want to change the base?
Conversation
Hello @alexdesiqueira! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
|
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.
center
seems not to be the correct parameter name. Isn't shift
better since the ellipsoid is shifted relatively to the returned volume center?
Shouldn't the shape of the returned volume be adapted such that it contains the whole generated ellipsoid?
@@ -2,7 +2,7 @@ | |||
from scipy.special import (ellipkinc as ellip_F, ellipeinc as ellip_E) | |||
|
|||
|
|||
def ellipsoid(a, b, c, spacing=(1., 1., 1.), levelset=False): | |||
def ellipsoid(a, b, c, spacing=(1., 1., 1.), levelset=False, center=(0, 0, 0)): |
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.
center
argument should be documented.
@@ -33,6 +33,8 @@ def ellipsoid(a, b, c, spacing=(1., 1., 1.), levelset=False): | |||
if (a <= 0) or (b <= 0) or (c <= 0): | |||
raise ValueError('Parameters a, b, and c must all be > 0') | |||
|
|||
# Receiving the center coordinates | |||
a_center, b_center, c_center = center |
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 test for center
length, otherwise the unpacking will raise an error.
I think we should define something consistent with the other algorithms (if that's the not case, i.e., if this is a specific case for this algorithm and needs a different name, please let me know why or point me a reference).
Maybe. If that's the case we could try to solve this two things "at once"; I'll ask for @sciunto's input in it. |
Hi @alexdesiqueira, the way you defined |
Description
Inserting center coordinates to ellipsoid.
Checklist
./doc/examples
(new features only)./benchmarks
, if your changes aren't covered by anexisting benchmark
For reviewers
later.
__init__.py
.doc/release/release_dev.rst
.@meeseeksdev backport to v0.14.x