Skip to content

Mean - #580

Merged
jturner314 merged 3 commits into
rust-ndarray:masterfrom
LukeMathWalker:mean
Mar 26, 2019
Merged

Mean#580
jturner314 merged 3 commits into
rust-ndarray:masterfrom
LukeMathWalker:mean

Conversation

@LukeMathWalker

Copy link
Copy Markdown
Member

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

@LukeMathWalker

LukeMathWalker commented Jan 10, 2019

Copy link
Copy Markdown
MemberAuthor

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

@jturner314jturner314 left a comment

Copy link
Copy Markdown
Member

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.

Comment threadCargo.toml Outdated
Comment threadsrc/numeric/impl_numeric.rs Outdated
Comment threadsrc/numeric/impl_numeric.rs Outdated
Comment threadsrc/numeric/impl_numeric.rs Outdated
Comment threadCargo.toml
@LukeMathWalker

Copy link
Copy Markdown
MemberAuthor

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

@jturner314jturner314 left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
MemberAuthor

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

jturner314 commented Mar 26, 2019

Copy link
Copy Markdown
Member

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.

@jturner314
jturner314 merged commit 47b2691 into rust-ndarray:masterMar 26, 2019
Sign up for freeto 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.

2 participants

@LukeMathWalker@jturner314