Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Miscellaneous small improvements to central moments#3

Merged
LukeMathWalker merged 8 commits intoLukeMathWalker:central-momentsLukeMathWalker/ndarray-stats:central-momentsfrom
rust-ndarray:central-momentsrust-ndarray/ndarray-stats:central-momentsCopy head branch name to clipboard
Apr 1, 2019
Merged

Miscellaneous small improvements to central moments#3
LukeMathWalker merged 8 commits intoLukeMathWalker:central-momentsLukeMathWalker/ndarray-stats:central-momentsfrom
rust-ndarray:central-momentsrust-ndarray/ndarray-stats:central-momentsCopy head branch name to clipboard

Conversation

@jturner314
Copy link

No description provided.

In reality, this probably isn't necessary because I'd expect someone
to terminate their program when trying to calculate a moment of order
greater than `i32::MAX` (because it would take so long), but it's nice
to have an explicit check anyway.
`A: Float` requires `A: Copy`.
I think this is a bit easier to understand at first glance.
use super::SummaryStatisticsExt;
use ndarray::{ArrayBase, Data, Dimension};
use num_traits::{Float, FromPrimitive, Zero};
use num_integer::IterBinomial;
Copy link
Owner

Choose a reason for hiding this comment

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

This is handy!

@LukeMathWalker LukeMathWalker merged commit 94f0950 into LukeMathWalker:central-moments Apr 1, 2019
@LukeMathWalker LukeMathWalker deleted the central-moments branch April 1, 2019 07:35
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.