Skip to content

Fix: index_select/bool_select with zero-size mask - #86

Merged
ajz34 merged 1 commit into
RESTGroup:masterfrom
ajz34:fix-zero_size_dim_select
Jul 22, 2026
Merged

Fix: index_select/bool_select with zero-size mask#86
ajz34 merged 1 commit into
RESTGroup:masterfrom
ajz34:fix-zero_size_dim_select

Conversation

@ajz34

@ajz34 ajz34 commented Jul 22, 2026

Copy link
Copy Markdown
Member

Previously, index_select with empty mask, or bool_select with all false mask, will cause panic.
This is due to using layout.dim_select(axis, 0) will fail if axis size is actually zero. Now use layout.dim_chop(axis). Similar code also changed.

@ajz34
ajz34 merged commit 47f2307 into RESTGroup:master Jul 22, 2026
8 checks passed
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.

1 participant