Add an example for an equivalent of numpy's column_stack function in ndarray_for_numpy_users
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 45/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- rust
- Domain
- documentation
Research direction
Start in the ndarray_for_numpy_users documentation section and compare its existing examples with NumPy's column_stack reference. Add a documented Rust example based on stack(Axis(1), ...), with the work complete when the section clearly shows the equivalent operation.
Written by the indexing model from the issue text.
Description
I was looking for an equivalent function of numpy's column_stack (see https://docs.scipy.org/doc/numpy/reference/generated/numpy.column_stack.html) in ndarray docs.
This is how I managed to solve the issue:
use ndarray::{Array, Axis, stack, arr2};
let a = Array::linspace(0., 1., 5).into_shape((5,1)).unwrap();
let b = Array::<f64, _>::ones((5, 1));
let res = stack(Axis(1), &[b.view(), a.view()]);
assert!(res == Ok(arr2(&[[1., 0.],
[1., 0.25],
[1., 0.5],
[1., 0.75],
[1., 1.]])));
It could be worth to have an example in ndarray_for_numpy_users section of the docs.
- 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