Support for .multi_slice_axis_mut and .multi_slice_axis_move
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reading the existing multi_slice_mut and slice_axis_mut APIs, which the issue identifies as the relevant precedents. Trace how their returned views and axis handling work, then define the corresponding behavior for multi_slice_axis_mut and multi_slice_axis_move. Done means the shown Axis(0) example is supported with the expected four views.
Written by the indexing model from the issue text.
Description
From #775:
We should add
multi_slice_axis_mutandmulti_slice_axis_movemethods, in the same way thatslice_axis_mutis analogous toslice_mut.
Are the methods multi_slice_axis_mut and multi_slice_axis_move still desired? I was looking for such functionality. If so, based on multi_slice_mut, is my understanding correct in that these two methods would make the following possible?
let mut example = array![
[0, 0, 0],
[0, 0, 0],
[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
[0, 0, 0],
[0, 0, 0],
];
let (mut pad_lo, mut pad_hi, mut edge_lo, mut edge_hi) =
example.multi_slice_axis_mut(Axis(0), (s![..2], s![5..], s![2], s![4]));
// pad_lo: [ [ 0, 0, 0 ],
// [ 0, 0, 0 ] ]
// pad_hi: [ [ 0, 0, 0 ],
// [ 0, 0, 0 ] ]
// edge_lo: [ [ 1, 2, 3 ] ]
// edge_hi: [ [ 7, 8, 9 ] ]
Although I'm still learning a lot about Rust, I would love to give implementing it a try, if the functionality is still on the to-do list.
It'd also come in handy for the ndarray-pad crate I'm working on!
I moved this into its own separate issue to not clutter the mentioned issue.
- Dominant language
- Rust
- Stars
- 4.3k
- Forks
- 391
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-ndarray/ndarray
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
rust-ndarray/ndarray#1612 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
rust-ndarray/ndarray#1617 · 1 comment ·
-
bug good first issue
Difficulty 3/5 1-2 days Newbie friendliness 68/100
rust-ndarray/ndarray#1615 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
rust-ndarray/ndarray#1610 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
rust-ndarray/ndarray#1609 ·
All issues in rust-ndarray/ndarray
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100