#ndarray — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #ndarray, aggregated by home.social.
-
It took 10 days of on and off programming with #rust and #ndarray crate to solve #AdventOfCode day 4. It was bizzarely tough.
NDarray is getting there (close to #numpy) but some key features like indexing using arrays and boolean masks was missing. Which made the implementation painful.
https://codeberg.org/ashwinvis/advent-of-code/src/branch/main/2024/examples/day04.rs
Could it be better?
-
@smranaldi Coming from #Python and #JuliaLang, I was annoyed at first by things like
1 + 1.0
which does not compile. You have to cast often, but you understand after a while why this is important to prevent any surprises!
I missed Arrays in Julia (multidimensional). I needed a matrix but felt like it would be an overkill to use #ndarray for it. So I wrote my small matrix for fun. It was not hard! Next time I will try #ndarray if I need multidimensional arrays more often.
2/4
-
@smranaldi I have used Julia and would recommend it for this field. But I wanted to try Rust for numerical computations very soon. Check out #polars, #ndarray and #plotters.
-
ndarray 0.15 is finally released. 😓
The following are some highlights, see the release note for the whole story.
https://github.com/rust-ndarray/ndarray/blob/master/RELEASES.md#version-0150-2021-03-25
- Inserting new axes while slicing
- two-sided broadcasting for arithmetic operations
- `.cell_view()
- Improved `Array::uninit`
Thanks to **jturner314**, **SparrowLii**, **xd009642**, **dam5h**, **insideoutclub** and **bluss** who contributed the changes for this release.
-
Rust crate ndarray got a 0.14 release finally. Release note: https://github.com/rust-ndarray/ndarray/blob/master/RELEASES.md
#rust #rustsci #ndarray