-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding statistical functions #102
Conversation
Thank you for the fixes! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to add the user-facing .mean()
method in par_pipe.rs and par_stream.rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.mean()
needs to be exposed as a user-facing function in par_stream dn par_sink
Added |
85709f1
to
57998dc
Compare
Changes to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clippy gives a bunch of cast_precision_loss
warnings. Could you possibly use these two methods in place of as
to fix this?
#[allow(
clippy::cast_possible_truncation,
clippy::cast_sign_loss,
clippy::cast_precision_loss
)]
fn u64_to_f64(x: u64) -> f64 {
assert_eq!(x, x as f64 as u64);
x as f64
}
#[allow(
clippy::cast_possible_truncation,
clippy::cast_sign_loss,
clippy::cast_precision_loss,
clippy::float_cmp
)]
fn f64_to_u64(x: f64) -> u64 {
assert_eq!(x, x as u64 as f64);
x as u64
}
To be extra neat perhaps you could put these in amadeus-core/src/util.rs
and adjust amadeus-core/src/file/local.rs
to use them as well?
Pull request has been modified.
…Updated for file/local.rs.
Merge pull request constellation-rs#102 from Keverne/master
No description provided.