Skip to content

Fix cumulative operations when axis=None#2653

Merged
awni merged 1 commit intoml-explore:mainfrom
aisk:cumulative-ops-axis-fix
Oct 8, 2025
Merged

Fix cumulative operations when axis=None#2653
awni merged 1 commit intoml-explore:mainfrom
aisk:cumulative-ops-axis-fix

Conversation

@aisk
Copy link
Copy Markdown
Contributor

@aisk aisk commented Oct 5, 2025

Proposed changes

Previously, the Python bindings used workarounds by flattening arrays and operating along axis 0. Now these operations have proper C++ overloads without axis parameters that automatically flatten the arrays, following the same pattern as concatenate.

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)

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.

Looks good, thanks!

@awni awni merged commit 85a8824 into ml-explore:main Oct 8, 2025
1 check passed
@aisk aisk deleted the cumulative-ops-axis-fix branch October 9, 2025 01:34
faisalmemon pushed a commit to faisalmemon/mlx that referenced this pull request Oct 30, 2025
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