Skip to content

Conversation

Harsh-Mathur-1503
Copy link

@Harsh-Mathur-1503 Harsh-Mathur-1503 commented Oct 2, 2025

Resolves #8095

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

Description

What is the purpose of this pull request?

This PR adds a new package @stdlib/stats/base/ndarray/meankbn,
which computes the arithmetic mean of a one-dimensional ndarray
using the improved Kahan–Babuška algorithm.

This pull request:

  • Adds a new package @stdlib/stats/base/ndarray/meankbn
  • Computes the arithmetic mean of a one-dimensional ndarray using the improved Kahan–Babuška algorithm
  • Mirrors the API of @stdlib/stats/base/ndarray/mean but uses the improved Kahan–Babuška algorithm
  • Includes fully implemented examples, tests, benchmarks, and TypeScript declarations

Related Issues

Does this pull request have any related issues?

This pull request:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. First-time Contributor A pull request from a contributor who has never previously committed to the project repository. Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Oct 2, 2025
@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/ndarray/meankbn $\color{green}89/89$
$\color{green}+100.00\%$
$\color{green}5/5$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}89/89$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this PR.

@kgryte kgryte changed the title feat: add stats/base/ndarray/meankbn feat: add stats/base/ndarray/meankbn Oct 2, 2025
@kgryte kgryte requested a review from gururaj1512 October 2, 2025 19:40
@kgryte kgryte added the Needs Changes Pull request which needs changes before being merged. label Oct 2, 2025
@stdlib-bot stdlib-bot added the Potential Duplicate There might be another pull request resolving the same issue. label Oct 3, 2025
@Harsh-Mathur-1503
Copy link
Author

@kgryte May i know what changes are required so that this PR can be accepted ?

Copy link
Member

Choose a reason for hiding this comment

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

Refer to the lib folder of stats/base/ndarray/mean. Use a similar implementation to stats/base/ndarray/mean and just update imports and docs according to meankbn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor A pull request from a contributor who has never previously committed to the project repository. Good First PR A pull request resolving a Good First Issue. Needs Changes Pull request which needs changes before being merged. Needs Review A pull request which needs code review. Potential Duplicate There might be another pull request resolving the same issue. Statistics Issue or pull request related to statistical functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC]: add stats/base/ndarray/meankbn
4 participants