Fix misleading docstring in cartesian_to_spherical#4764
Open
changsheng0804-blip wants to merge 1 commit into
Open
Fix misleading docstring in cartesian_to_spherical#4764changsheng0804-blip wants to merge 1 commit into
changsheng0804-blip wants to merge 1 commit into
Conversation
…ity#3123) The docstring for cartesian_to_spherical stated the return order as (distance, phi, theta) but the actual return was [r, theta, phi]. This updates both cartesian_to_spherical and spherical_to_cartesian docstrings to clearly document the return order as (r, theta, phi) and define each component: r = radius, theta = azimuthal angle in the xy-plane, phi = polar angle from the positive z-axis.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #3123
The docstring for \cartesian_to_spherical\ stated the return order as (distance, phi, theta), but the actual return value is [r, theta, phi]. This PR updates the docstrings of both \cartesian_to_spherical\ and \spherical_to_cartesian\ to:
\ — radius (distance from the origin)
No code logic was changed — this is a documentation-only fix.
References