2 releases
0.1.2 | Nov 28, 2022 |
---|---|
0.1.1 | Nov 26, 2022 |
0.1.0 |
|
#2 in #iris
Used in joinable
29KB
1K
SLoC
irisdata
Fisher's Iris data set. Add this to your project with cargo add irisdata
, then you can use these data however you want:
let virginica_avg_petal_length = irisdata::IRIS_DATA
.iter()
.filter_map(|i| {
if i.species == Species::IrisVirginica {
Some(i.petal_length)
} else {
None
}
})
.sum::<f32>()
/ 50.;
assert_eq!(5.5520005, avg);