-
-
Notifications
You must be signed in to change notification settings - Fork 883
Add ndarray meankbn #8117
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
base: develop
Are you sure you want to change the base?
Add ndarray meankbn #8117
Conversation
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
2 similar comments
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
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.
This file should be removed.
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.
hello @kgryte as you say i have to make meankbn for this repo and i have implemented meankbn similarly like mean.
Can you tell me why should i remove them.
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.
a) Because they are incorrect. b) Because no files should be added at the path stats/base/strided/*
. That namespace does not exist.
// MODULES // | ||
|
||
var main = require( './main.js' ); | ||
var ndarray = require( './ndarray.js' ); // you need to create this |
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.
@shaswata-26 This sort of comment is a tell-tale that you are using AI. If you are, please don't. Please take the time to actually go through the files by hand. Only once you have sufficiently grokked the codebase and its conventions is it reasonable to consider how to leverage AI for authoring contributions.
@shaswata-26 You need to follow our development guide. You checked the box in your OP, but based on your Git history and the inclusion of various changes which I have to discard for each of your PRs, it is clear that you haven't actually spent time understanding our development process. In that guide, you will find a reference to a Git cheatsheet: https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/git_cheatsheet.md. Please study that before making future contributions. |
Resolves #8095
Description
This pull request introduces @stdlib/stats/base/ndarray/meankbn, a function to compute the mean of a one-dimensional ndarray using the improved Kahan–Babuška algorithm, which enhances numerical accuracy for floating-point computations.
Specifically, this PR:
Implements meankbn with support for empty arrays, single-element arrays, non-unit strides, negative strides, and non-zero offsets.
Adds comprehensive tests to verify correctness across various scenarios.
Provides examples demonstrating proper usage of meankbn.
Includes benchmarks to evaluate performance across arrays of different lengths.
Related Issues
Resolves #8095
Questions
No questions for reviewers.
Other
No additional notes.
Checklist
All tests pass: make test TESTS_FILTER="./stats/base/ndarray/meankbn/."
Examples run correctly: make examples EXAMPLES_FILTER="./stats/base/ndarray/meankbn/."
Benchmarks execute successfully: make benchmark BENCHMARKS_FILTER="./stats/base/ndarray/meankbn/."