Added implementation of var and std methods for ArrayBase#790
Added implementation of var and std methods for ArrayBase#790bluss merged 5 commits intorust-ndarray:masterfrom
var and std methods for ArrayBase#790Conversation
|
I see that the build fails at |
|
Thanks! Looks similar to #753 I don't mind whichever gets merged first |
|
@jturner314 and @bluss I think it makes sense to merge this? |
|
@jturner314 , @bluss , @ZuseZ4 anything else I should do to help with the merge? |
…ensional versions of `var_axis` and `std_axis` methods
|
Looks great. I've rebased to current master so that tests will run properly with new CI. Given the commit history, I'd merge this with squash to clean it up a bit |
|
Thanks! |
|
cc @xd009642 Your comment would actually be interesting - w.r.t overlapping functionality with ndarray-stats. I don't think ndarray needs to include more of this, also unsure how we ended up here. Moving this method to ndarray-stats wouldn't be wrong IMO. |
|
Yeah I wouldn't be opposed to moving this functionality to ndarray-stats and then deprecating here |
|
Oh so we ended up with var and std here - because we already had them in the axis variants here since long ago. It's hard to draw the line what's so basic that it could stay here - but from the summary functions I guess only |
|
I'll make a PR to improve the array traversal here - for performance. Fixed in 225d967 |
PR #790 was forgotten in release note (because it was integrated without a merge commit, I missed it).
I have found that ArrayBase is missing single-dimensional implementations for
varandstd. While you can usevar_axis(Axis(0), 1.), it can become verbose and unnecessary in code with lots of single-dimensional arrays. I thinksum_axisandmean_axishavesumandmeanfor this reason too.Please consider merging this pull request.