| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| """Test suite for statistics module, including helper NumericTestCase and | ||
| x = """Test suite for statistics module, including helper NumericTestCase and | ||
|
Comment thread
Copy link
Copy Markdown
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityIs this a typo or some kind of black magic?
Sorry, something went wrong.
All reactions
|
||
| approx_equal function. | ||
|
|
||
| """ | ||
| Expand Down Expand Up | @@ -2610,6 +2610,16 @@ def test_proportional(self): | |
| self.assertAlmostEqual(slope, 20 + 1/150) | ||
| self.assertEqual(intercept, 0.0) | ||
|
|
||
| def test_float_output(self): | ||
| x = [Fraction(2, 3), Fraction(3, 4)] | ||
| y = [Fraction(4, 5), Fraction(5, 6)] | ||
| slope, intercept = statistics.linear_regression(x, y) | ||
| self.assertTrue(isinstance(slope, float)) | ||
| self.assertTrue(isinstance(intercept, float)) | ||
| slope, intercept = statistics.linear_regression(x, y, proportional=True) | ||
| self.assertTrue(isinstance(slope, float)) | ||
| self.assertTrue(isinstance(intercept, float)) | ||
|
|
||
| class TestNormalDist: | ||
|
|
||
| # General note on precision: The pdf(), cdf(), and overlap() methods | ||
| Expand Down | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Optimized fmean(), correlation(), covariance(), and linear_regression() | ||
| using the new math.sumprod() function. |
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.