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

Mean #580

Merged
merged 3 commits into from Mar 26, 2019
Merged

Mean #580

merged 3 commits into from Mar 26, 2019

Conversation

LukeMathWalker
Copy link
Member

Upstream mean from ndarray-stats to ndarray.
Breaking change on mean_axis: it returns Option<Array<A, D:Smaller>> now.

@LukeMathWalker
Copy link
Member Author

LukeMathWalker commented Jan 10, 2019

The CI run on nightly seems to be failing for unrelated reasons (failing to install Rust itself).

Copy link
Member

@jturner314 jturner314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI issue (due to rust-lang/rust#57488) is now fixed, so I re-ran CI.

I added a few comments. Additionally, if we add tests/numeric.rs (which is a good idea IMO), we should also move the relevant tests in tests/array.rs to it (e.g. sum_mean, sum_mean_empty, var_axis, std_axis, etc.).

Everything else looks good to me.

Cargo.toml Outdated Show resolved Hide resolved
src/numeric/impl_numeric.rs Outdated Show resolved Hide resolved
src/numeric/impl_numeric.rs Outdated Show resolved Hide resolved
src/numeric/impl_numeric.rs Outdated Show resolved Hide resolved
Cargo.toml Show resolved Hide resolved
@LukeMathWalker
Copy link
Member Author

All done - I have moved all the numeric tests I could spot in array.rs to numeric.rs.

Copy link
Member

@jturner314 jturner314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Once this is merged, I think we should also change var_axis and std_axis to return an Option so that they're consistent with mean_axis. [Edit: They do require A: Float, though, so this isn't strictly necessary.]

@LukeMathWalker
Copy link
Member Author

I am happy to do the changes to var_axis and std_axis in this PR @jturner314, if this makes the merging of PRs with breaking changes easier (less coordination required).

@jturner314
Copy link
Member

jturner314 commented Mar 26, 2019

I'm not quite sure why I waited to merge this. (Maybe I was waiting on #577?) Anyway, let's go ahead and merge it.

Thanks for your work on this @LukeMathWalker!

Edit: I've rearranged the commit history to keep some commits separate but combine several small ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants