-
-
Notifications
You must be signed in to change notification settings - Fork 926
feat: add stats/base/ndarray/meankbn
#8116
New issue
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
Conversation
…) with docs, examples, tests, benchmark
|
👋 Hi there! 👋 And thank you for opening your first pull request! We will review it shortly. 🏃 💨 Getting Started
Next Steps
Running Tests LocallyYou can use # Run tests for all packages in the math namespace:
make test TESTS_FILTER=".*/@stdlib/math/.*"
# Run benchmarks for a specific package:
make benchmark BENCHMARKS_FILTER=".*/@stdlib/math/base/special/sin/.*"If you haven't heard back from us within two weeks, please ping us by tagging the "reviewers" team in a comment on this PR. If you have any further questions while waiting for a response, please join our Gitter channel to chat with project maintainers and other community members. We appreciate your contribution! Documentation Links |
Coverage Report
The above coverage report was generated for the changes in this PR. |
stats/base/ndarray/meankbn
|
Addressed review feedback: updated README, aligned index.js and example with project conventions, and normalized package.json. Tests and example pass locally. PTAL. @kgryte |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick review! I’ve aligned the new package with project conventions by:
-
Rewriting the README to match the structure of sibling packages (Usage / Notes / Examples / See Also), fixed code fences and wording, and clarified the ndarray call shape.
-
Updating index.js and lib/index.js to include license headers, module JSDoc, and proper re-export of ./lib.
-
Making the example build a typed ndarray and print the result (mirrors ndarray/mean style).
-
Normalizing package.json fields (name, description, license, main, keywords).
-
Verifying tests/examples/benchmarks pass locally for this package.
If there are any remaining convention nits (section order, phrasing, example format, or types), I’m happy to adjust. PTAL, thanks! @kgryte
Signed-off-by: Bureir AL <[email protected]>
|
@headlessNode @kgryte Resolved README.md not following project conventions :) PTAL |
Co-authored-by: Muhammad Haris <[email protected]> Signed-off-by: Bureir AL <[email protected]>
Co-authored-by: Muhammad Haris <[email protected]> Signed-off-by: Bureir AL <[email protected]>
…/index.d.ts Co-authored-by: Muhammad Haris <[email protected]> Signed-off-by: Bureir AL <[email protected]>
Signed-off-by: Bureir AL <[email protected]>
…numerics.js Signed-off-by: Bureir AL <[email protected]>
lib/node_modules/@stdlib/stats/base/ndarray/meankbn/docs/types/test.ts
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/ndarray/meankbn/test/test.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Muhammad Haris <[email protected]> Signed-off-by: Bureir AL <[email protected]>
…/test.ts Co-authored-by: Muhammad Haris <[email protected]> Signed-off-by: Bureir AL <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewing, one moment
…visual comparison against ndarray mean and strided meankbn
…visual comparison against ndarray mean and strided meankbn
|
@headlessNode Fully reviewed and fixed, there was a local version issue and this should almost perfectly meet project conventions unless I misunderstood something. Please see my commit title, I went through each file. I could have missed something but can fix things quickly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @kgryte will do the final check & merge.
|
@kgryte @headlessNode Fixed spacing |
---
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: na
- 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
---
---
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: na
- 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
---
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after clean-up.
|
Thank you for your contribution and congratulations on your first PR! |
Resolves #8095
Description
This pull request:
@stdlib/stats/base/ndarray/meankbn, an ndarray wrapper around@stdlib/stats/strided/meankbnimplementing the improved Kahan–Babuška compensation algorithm;@stdlib/stats/base/ndarray/mean(supports empty and singleton inputs, non-unit and negative strides, and non-zero offsets);ndarray/mean, plus a numerics test demonstrating improved conditioning on[1e16, 1, -1e16];Related Issues
This pull request:
stats/base/ndarray/meankbn#8095Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers