docs: clarify broadcasting example title, subtitle, and summary paragraph#882
Open
mujju-212 wants to merge 1 commit intoneuroinformatics-unit:mainfrom
Open
Conversation
Addresses the first two checklist items from issue neuroinformatics-unit#564: - Rename the sphinx-gallery title from 'Broadcast functions across multi-dimensional data' to 'Apply custom functions across movement data dimensions', making the purpose immediately clear to readers who are not familiar with the term 'broadcasting'. - Replace the vague subtitle with one that names the decorator, the problem it solves (nested loops), and the typical use-case (individuals / keypoints / time frames). - Rewrite the Summary section with a short introductory paragraph that (1) states the motivating problem, (2) explains how @make_broadcastable solves it, and (3) previews the case study used throughout the example. Refs neuroinformatics-unit#564
|
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
Addresses the first two checklist items from issue #564:
What changed
1. Title (sphinx-gallery heading)
Broadcast functions across multi-dimensional dataApply custom functions across movement data dimensionsThe old title used the technical term "broadcast" without context. The new title immediately conveys what you are doing (applying custom functions) and where (across a movement dataset), which is more informative for users browsing the example gallery.
2. Subtitle (second line of docstring)
Use the @make_broadcastable decorator to efficiently apply functions across any data dimension.Use the ``@make_broadcastable`` decorator to run your own analysis functions across all individuals, keypoints, and time frames—without nested loops.The new subtitle names the concrete axes (
individuals,keypoints,time frames) that users typically iterate over, and explicitly mentions the problem it solves (nested loops), giving readers an immediate reason to care.3. Summary section (introductory paragraph)
The old summary jumped straight to describing the decorator, without first stating the problem. The new paragraph follows the structure:
forloops are verbose, error-prone, and tightly coupled to the dataset shape.@make_broadcastabledecorates your function once, so it accepts an entireDataArray, applies along the chosen dimension, and returns a newDataArraywith coordinates intact.References
Closes the first checkbox of #564. The second checkbox (content improvements) will be addressed in a separate PR as suggested in the issue.
Checklist