Commit 2c6e671
Fix LogicalIndex type for multi-dimensional boolean indexing
Match Base.to_indices behavior across Julia versions for multi-dimensional
boolean array indexing. Julia >= 1.12 changed Base.to_indices to return
LogicalIndex{CartesianIndex{N}} for N-D boolean arrays, while Julia < 1.12
returns LogicalIndex{Int} (linear indices) for trailing boolean arrays on
IndexLinear arrays.
Use @static version check to select the correct LogicalIndex type, ensuring
static_to_indices matches Base.to_indices on both Julia 1.10 and 1.12+.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 16e29eb commit 2c6e671
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
73 | 80 | | |
74 | 81 | | |
75 | 82 | | |
| |||
0 commit comments