DEV Community

Cover image for Rust for Data Science: Tutorial 1

Rust for Data Science: Tutorial 1

Davide Del Papa on August 24, 2021

[Photo by jim gade on Unsplash, modified] Data Science: a branch of computer science that studies how to use, store, and analyze data in order to...
Collapse
 
dougfort profile image
dougfort

You had me worried for a minute. The article only uses 300 points, which produces a disappointing graph. The code in github uses 10,000 points, which is much more satisfying.

let arr18 = Array::::random_using((300, 2), StandardNormal, &mut rand::thread_rng());

Collapse
 
davidedelpapa profile image
Davide Del Papa

šŸ˜‚šŸ˜‰ good catch... in fact I just forgot to update the numbers, but the image refers to the GitHub repo

Collapse
 
minigamedev profile image
Mossa

Small correction: There is a snippet that says use twice, i.e.

use use ndarray_rand::rand_distr::{Uniform, StandardNormal}; 
Enter fullscreen mode Exit fullscreen mode
Collapse
 
davidedelpapa profile image
Davide Del Papa

Edited. Thank you!

Collapse
 
friendbear profile image
T Kumagai

I’m trying.

Thank ⛩

Collapse
 
softmoth profile image
Tim Siegel

Thank you, this is very helpful! Especially guiding through using noisy_float with the histogram!