Skip to content

docs(space_ops): correct cartesian_to_spherical return order#4856

Open
Chessing234 wants to merge 1 commit into
ManimCommunity:mainfrom
Chessing234:docs/3123-cartesian-to-spherical-return-order
Open

docs(space_ops): correct cartesian_to_spherical return order#4856
Chessing234 wants to merge 1 commit into
ManimCommunity:mainfrom
Chessing234:docs/3123-cartesian-to-spherical-return-order

Conversation

@Chessing234

Copy link
Copy Markdown

Summary

  • cartesian_to_spherical documented its return value as (distance, phi, theta), but it actually returns [r, theta, phi] (consistent with spherical_to_cartesian, so the two round-trip).
  • Corrected the docstring and added a Returns section describing each value.

Fixes #3123

Test plan

  • pytest tests/module/utils/test_space_ops.py::test_polar_coords (confirms the actual (r, theta, phi) return order).

Made with Cursor

The docstring claimed the function returns (distance, phi, theta), but it
returns [r, theta, phi] (matching spherical_to_cartesian). Fix the
description and document each returned value.

Fixes ManimCommunity#3123

Co-authored-by: Cursor <cursoragent@cursor.com>
@chopan050

Copy link
Copy Markdown
Member

Refrain from mass-opening too many AI-generated PRs. This is the 15th PR you generate in a span of 2 days.

@Chessing234

Copy link
Copy Markdown
Author

ok

@Chessing234

Copy link
Copy Markdown
Author

Understood, and apologies for the volume — that's fair feedback. I'll stop opening new PRs here and slow down considerably. Happy to close some of the open ones so they're easier to review a few at a time; just let me know which (if any) are worth keeping and I'll prioritize those and drop the rest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confusing/Misleading docstring for cartesian_to_spherical

2 participants