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?

advent-of-code/2024/examples/day04.rs at main

advent-of-code - Advent of Code to learn Haskell, Rust, Nix etc

Codeberg.org

ndarray 0.16 is released: https://github.com/rust-ndarray/ndarray/releases/tag/0.16.0

A release has been needed for a long time to say the least, and it's a very big one too. I'm happy it's out.

#rust #ndarray

Release 0.16.0 ยท rust-ndarray/ndarray

Version 0.16.0 (2024-08-03) Featured Changes Better shape: Deprecate reshape, into_shape by @bluss #1310 .into_shape() is now deprecated. Use .into_shape_with_order() or .to_shape() instead, which...

GitHub

@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)

hidefix (https://github.com/gauteh/hidefix) can now be used as an #xarray backend: more than 6x faster on a 8 CPU machine!

This reads a full variable of about 370mb.

#rust #rayon #pyo3 #ndarray #netcdf4 #hdf5

GitHub - gauteh/hidefix: ๐Ÿ• Concurrent HDF5 and NetCDF4 reader (experimental)

๐Ÿ• Concurrent HDF5 and NetCDF4 reader (experimental) - GitHub - gauteh/hidefix: ๐Ÿ• Concurrent HDF5 and NetCDF4 reader (experimental)

GitHub
GitHub - termoshtt/einsum-derive: Proc-macro based einsum implementation for rust-ndarray

Proc-macro based einsum implementation for rust-ndarray - GitHub - termoshtt/einsum-derive: Proc-macro based einsum implementation for rust-ndarray

GitHub
@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. ๐Ÿ˜“

https://docs.rs/ndarray/0.15

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 #ndarray #rustsci

ndarray - Rust

The `ndarray` crate provides an n-dimensional container for general elements and for numerics.

Rust crate ndarray got a 0.14 release finally. Release note: https://github.com/rust-ndarray/ndarray/blob/master/RELEASES.md
#rust #rustsci #ndarray
rust-ndarray/ndarray

ndarray: an N-dimensional array with array views, multidimensional slicing, and efficient operations - rust-ndarray/ndarray