Skip to content

Improved mx.split() docs#2689

Merged
awni merged 3 commits into
ml-explore:mainfrom
Maalvi14:2675-improve-mx-split-docs
Oct 24, 2025
Merged

Improved mx.split() docs#2689
awni merged 3 commits into
ml-explore:mainfrom
Maalvi14:2675-improve-mx-split-docs

Conversation

@Maalvi14

Copy link
Copy Markdown
Contributor

Proposed changes

Changed the documentation of mx.split() based on the comments on #2675. Documentation change is regarding what a list passed as the second arg of the function is used for (a boundary that dictates all previous elements before the index will be split into a subarray).

Before: the list contains the indices of the start of each subarray along the given axis.
After: the list contains the indices which are the split points or boundaries where the array should be divided.

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING document
  • I have run pre-commit run --all-files to format my code / installed pre-commit prior to committing changes
  • I have added tests that prove my fix is effective or that my feature works -> Not necessary
  • I have updated the necessary documentation (if needed)

@awni awni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

@awni awni merged commit 2333841 into ml-explore:main Oct 24, 2025
4 of 7 checks passed
faisalmemon pushed a commit to faisalmemon/mlx that referenced this pull request Oct 30, 2025
* Improved mx.split() documentation

* Fix typo in docstring for array split function

* add example

---------

Co-authored-by: Awni Hannun <awni@apple.com>
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.

2 participants