You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to know of the developments that have been made in this regard. What are the available modules? Which aspects can be contributed on? Also does Rust provide support for Numpy objects?
The text was updated successfully, but these errors were encountered:
kaushiksk
changed the title
Implementing Python preprocessing modulesin Rust for ML/AI applications
Implementing Python preprocessing modules in Rust for ML/AI applications
Jun 24, 2017
You can create N-dimensional array using the nd-array crate.
Sample code snippet:
Create a new Rust project:
cargo new --bin sample_matrix
cd sample_matrix
cargo add ndarray
Modifications in src/main.rs
#[macro_use(array)]
extern crate ndarray;
fn main() {
let sample_matrix = array![[1, 2],[3, 4]];
println!("The Zero matrix {}", sample_matrix);
}
Output for above snippet:
Q2. Which aspects can be contributed on?
This is a very interesting area for contribution you can try to incorporate the below code example which basically parallelizes reading of images in a directory to the python rust module recipe in the kit,
extern crate rayon;
extern crate Image;
fn load_images(paths: &[PathBuf]) -> Vec<Image> {
// loads images in parallel thread using par_iter method of rayon crate
path.par_iter().map(|path| {Image::load(path)}).collect()
}
I'd like to know of the developments that have been made in this regard. What are the available modules? Which aspects can be contributed on? Also does Rust provide support for Numpy objects?
The text was updated successfully, but these errors were encountered: