Skip to content
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

Use ndarray stats #72

Merged
merged 2 commits into from
Nov 30, 2023
Merged

Use ndarray stats #72

merged 2 commits into from
Nov 30, 2023

Conversation

kylecarow
Copy link
Collaborator

@kylecarow kylecarow commented Nov 22, 2023

This PR eliminates ndarrmax and ndarrmin and instead uses the methods implemented by ndarray_stats::QuantileExt

For example:

- let mc_max_eff = ndarrmax(&self.mc_eff_array);
+ let mc_max_eff = self.mc_eff_array.max().unwrap();

@kylecarow
Copy link
Collaborator Author

this might be useful for other features, see the docs here: https://docs.rs/ndarray-stats/latest/ndarray_stats/
but otherwise this can be reviewed & merged

@kylecarow kylecarow marked this pull request as ready for review November 22, 2023 21:36
@kylecarow
Copy link
Collaborator Author

@calbaker this should be easy to review, thought it would be nice using this crate's impl on ndarray::ArrayBase to provide min and max functions rather than our own versions

@kylecarow
Copy link
Collaborator Author

@calbaker @robinsteuteville related to our discussion today: it seems that Rust only compiles code in dependencies that is actually used!
https://www.reddit.com/r/rust/comments/7z5z6h/dead_code_elimination_in_rust/

@kylecarow kylecarow merged commit 42268bf into fastsim-2 Nov 30, 2023
3 checks passed
@kylecarow kylecarow deleted the use-ndarray-stats branch November 30, 2023 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant