feat: add stats/incr/mkurtosis#10689
Conversation
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: passed
- task: lint_package_json
status: passed
- task: lint_repl_help
status: passed
- task: lint_javascript_src
status: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: passed
- task: lint_javascript_tests
status: passed
- task: lint_javascript_benchmarks
status: passed
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: passed
- task: lint_license_headers
status: passed
---
|
/stdlib update-copyright-years |
Coverage Report
The above coverage report was generated for the changes in this PR. |
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: passed
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: passed
- task: lint_javascript_tests
status: passed
- task: lint_javascript_benchmarks
status: passed
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: passed
- task: lint_license_headers
status: passed
---
|
/stdlib update-copyright-years |
@aryan7071, the slash command failed to complete. Please check the workflow logs for details. |
|
/stdlib update-copyright-years |
@aryan7071, the slash command failed to complete. Please check the workflow logs for details. |
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: na
- task: lint_javascript_benchmarks
status: passed
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: na
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: na
- task: lint_javascript_benchmarks
status: passed
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
Planeshifter
left a comment
There was a problem hiding this comment.
Thanks for opening a PR!
| "dependencies": { | ||
| "@stdlib/array/float64": "^0.0.x", | ||
| "@stdlib/assert/is-positive-integer": "^0.0.x", | ||
| "@stdlib/math/base/assert/is-nan": "^0.0.x", | ||
| "@stdlib/string/format": "^0.0.x" | ||
| }, | ||
| "devDependencies": { | ||
| "@stdlib/constants/float64/eps": "^0.0.x", | ||
| "@stdlib/math/base/special/abs": "^0.0.x", | ||
| "@stdlib/math/base/special/max": "^0.0.x", | ||
| "@stdlib/random/base/randu": "^0.0.x" |
There was a problem hiding this comment.
dependencies and devDependencies should be empty objects {}. These fields are auto-generated during package creation.
| ## See Also | ||
|
|
||
| - <span class="package-name">[`@stdlib/stats/incr/kurtosis`][@stdlib/stats/incr/kurtosis]</span><span class="delimiter">: </span><span class="description">compute a corrected sample excess kurtosis incrementally (all data, no window).</span> | ||
| - <span class="package-name">[`@stdlib/stats/incr/mskewness`][@stdlib/stats/incr/mskewness]</span><span class="delimiter">: </span><span class="description">compute a moving corrected sample skewness incrementally.</span> |
There was a problem hiding this comment.
This section is auto-generated. Remove it.
| // NaN at position 2 (0-indexed), window=4. | ||
| data = [ 1.0, 2.0, NaN, -2.0, -3.0, 4.0, 5.0 ]; | ||
| acc = mkurtosis( 4 ); | ||
| for ( i = 0; i < data.length; i++ ) { | ||
| v = acc( data[ i ] ); | ||
| if ( i >= 3 && i <= 5 ) { | ||
| // NaN in the window: positions 2-5. | ||
| t.ok( isnan( v ), 'returns NaN while NaN is in the window (i='+i+')' ); | ||
| } | ||
| } | ||
| t.end(); | ||
| }); |
There was a problem hiding this comment.
Missing assertions for i=2 (NaN enters the window, should return NaN) and i=6 (NaN leaves the window, should return a finite value matching naive computation). Without the latter, a broken recompute() goes undetected.
| { | ||
| mkurtosis(); // $ExpectError | ||
| } |
There was a problem hiding this comment.
Missing a test block for providing an invalid number of arguments. Per convention in other moving accumulator packages (e.g., mvariance), this should be:
// The compiler throws an error if the function is provided an invalid number of arguments...
{
mkurtosis(); // $ExpectError
mkurtosis( 4, 5 ); // $ExpectError
}
This replaces the current standalone block that only tests mkurtosis(); // $ExpectError.
stats/incr/mkurtosis
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: passed
- task: lint_package_json
status: passed
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: passed
- task: lint_javascript_tests
status: passed
- task: lint_javascript_benchmarks
status: passed
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: passed
- task: lint_license_headers
status: passed
---
|
/stdlib update-copyright-years |
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:
Resolves #14
Description
This pull request:
Related Issues
This pull request has the following related issues:
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
{{TODO: add disclosure if applicable}}
@stdlib-js/reviewers