Skip to content

feat: add stats/incr/nanwmean #6441

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

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

SergeantQuickscoper
Copy link

@SergeantQuickscoper SergeantQuickscoper commented Mar 29, 2025

subject: adds nanwmean package to the stats/incr/* namespace
type: feat

Description

Adds nanwmean package to the stats/incr/* namespace

What is the purpose of this pull request?

This pull request:

  • Adds a package which provides a way to compute the mean of a set of numbers while ignoring NaN values. It is made to address [RFC] Issue [RFC]: add stats/incr/nanwmean #5628, and as suggested in the issue, it is based on a thin wrapper around wmean, similar to the relationship between nansum and sum, maintaining API consistency and design. This commit includes appropriate documentation and tests for the new purpose of the package, styles of which are consistent to the stats/incr/* namespace.

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


@stdlib-js/reviewers

… namespace

This commit adds a package which provides a way to compute the mean of a set of numbers while ignoring NaN values.
It is made to address [RFC] Issue stdlib-js#5628, and as suggested in the issue, it is based on a thin wrapper around wmean, similar
to the relationship between nansum and sum, mainting API consistency and design. This commit includes appropriate documentation and tests
for the new purpose of the package, styles of which are consistent to the stats/incr/* namespace.

Fixes: stdlib-js#5628 [RFC]
Private-ref: stdlib-js#5628
Authored-by: Don Chacko <[email protected]>
@stdlib-bot stdlib-bot added the Good First PR A pull request resolving a Good First Issue. label Mar 29, 2025
Copy link
Contributor

@stdlib-bot stdlib-bot left a comment

Choose a reason for hiding this comment

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

👋 Hi there! 👋

And thank you for opening your first pull request! We will review it shortly. 🏃 💨

@stdlib-bot
Copy link
Contributor

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:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

@stdlib-bot
Copy link
Contributor

stdlib-bot commented Mar 29, 2025

Coverage Report

Package Statements Branches Functions Lines
stats/incr/nanwmean $\color{green}129/129$
$\color{green}+100.00\%$
$\color{green}8/8$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}129/129$
$\color{green}+100.00\%$

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

@stdlib-bot
Copy link
Contributor

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:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

@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. labels Mar 29, 2025
@stdlib-bot
Copy link
Contributor

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:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

1 similar comment
@stdlib-bot
Copy link
Contributor

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:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

SergeantQuickscoper and others added 2 commits March 31, 2025 19:51
… stats/incr/* namespace


This commit adds minor changes to the README.md of the nanwmean package, to improve clarity and fix a mistake in the usage section where a different package was used. 

Author: Don Roy Chacko <[email protected]>
Reviewed-by: hrshya

Co-authored-by: Harsh <[email protected]>
Signed-off-by: Don Roy Chacko <[email protected]>
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Mar 31, 2025
SergeantQuickscoper and others added 3 commits April 5, 2025 12:53
This commit fixes the lint errors in the nanwmean module. The changes are applied to the following files:
- nanwmean/README.md
- nanwmean/docs/repl.txt
- nanwmean/lib/index.js
- nanwmean/lib/main.js
- nanwmean/test/test.js
Improvements include:
- Correcting indentation and spacing issues
- Switch to LF line endings
This commit fixes remark lint errors in the README.md file for the `@stdlib/stats/incr/nanwmean` package.

Authored By: Don Roy Chacko <[email protected]>
@kgryte kgryte added the Needs Review A pull request which needs code review. label Apr 5, 2025
@SergeantQuickscoper
Copy link
Author

/stdlib lint-autofix

@stdlib-bot stdlib-bot added the bot: In Progress Pull request is currently awaiting automation. label Apr 5, 2025
@stdlib-bot stdlib-bot removed the bot: In Progress Pull request is currently awaiting automation. label Apr 5, 2025
@SergeantQuickscoper SergeantQuickscoper changed the title feat (stats/incr/nanwmean): adds nanwmean package to the stats/incr/* namespace feat(stats/incr/nanwmean): adds nanwmean package to the stats/incr/* namespace Apr 5, 2025
This commit is a license header lint fix for the nanwmean module for the README.md file.
…lib into feature/nanwmean

This commit accounts for the merge of the lint_autofix commit to the feature/nanwmean branch.
@kgryte kgryte changed the title feat(stats/incr/nanwmean): adds nanwmean package to the stats/incr/* namespace feat: add stats/incr/nanwmean Apr 5, 2025
@stdlib-bot stdlib-bot added the Potential Duplicate There might be another pull request resolving the same issue. label Apr 19, 2025
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 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/incr/nanwmean
4 participants