Skip to content

chore: Update Docs With Slice Copy Example#2559

Merged
awni merged 2 commits intoml-explore:mainfrom
krishi-saripalli:krishi/numpy-slice-docs
Sep 3, 2025
Merged

chore: Update Docs With Slice Copy Example#2559
awni merged 2 commits intoml-explore:mainfrom
krishi-saripalli:krishi/numpy-slice-docs

Conversation

@krishi-saripalli
Copy link
Copy Markdown
Contributor

@krishi-saripalli krishi-saripalli commented Aug 31, 2025

Proposed changes

Issue #2208 points out that unlike NumPy, modifying a slice does not modify the original array. This update to the documentation in Indexing Arrays > In Place Updates clearly describes this behaviour so that people coming from NumPy are aware of the difference

image

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
  • I have updated the necessary documentation (if needed)

@krishi-saripalli krishi-saripalli changed the title chore: Updated Docs With Slice Copy Example chore: Update Docs With Slice Copy Example Aug 31, 2025
@krishi-saripalli krishi-saripalli marked this pull request as ready for review August 31, 2025 21:12
Copy link
Copy Markdown
Member

@awni awni left a comment

Choose a reason for hiding this comment

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

Thanks!

@awni awni merged commit c5d2937 into ml-explore:main Sep 3, 2025
1 of 6 checks passed
faisalmemon pushed a commit to faisalmemon/mlx that referenced this pull request Oct 30, 2025
* chore: updated docs with slice copy example

* nits

---------

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