Skip to content

Comments

Allow take on empty array when it makes sense#3046

Merged
awni merged 1 commit intomainfrom
take_empty
Jan 23, 2026
Merged

Allow take on empty array when it makes sense#3046
awni merged 1 commit intomainfrom
take_empty

Conversation

@awni
Copy link
Member

@awni awni commented Jan 23, 2026

This also matches the behavior in numpy and closes ml-explore/mlx-lm#798

Copy link
Member

@angeloskath angeloskath left a comment

Choose a reason for hiding this comment

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

Thanks I was going through the same bug reaching the same conclusion :-)

@awni
Copy link
Member Author

awni commented Jan 23, 2026

There is a flaky test in our gemv.. slightly concerning.

@awni awni merged commit 9bac6f8 into main Jan 23, 2026
15 of 16 checks passed
@awni awni deleted the take_empty branch January 23, 2026 15:25
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.

BatchKVCache filter crash on zero-length cache when reusing prompt cache (second server_benchmark run)

2 participants