Skip to content

Comments

feat: add stats/array/nanmskmidrange#10224

Merged
Planeshifter merged 3 commits intostdlib-js:developfrom
Sachinn-64:stats-array-nanmskmidrange
Feb 15, 2026
Merged

feat: add stats/array/nanmskmidrange#10224
Planeshifter merged 3 commits intostdlib-js:developfrom
Sachinn-64:stats-array-nanmskmidrange

Conversation

@Sachinn-64
Copy link
Member

Resolves None.

Description

What is the purpose of this pull request?

This pull request:

  • feat: add stats/array/nanmskmidrange

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

  • None

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.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

{{TODO: add disclosure if applicable}}


@stdlib-js/reviewers

@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Needs Review A pull request which needs code review. labels Feb 11, 2026
@Sachinn-64
Copy link
Member Author

/stdlib update-copyright-years

@stdlib-bot stdlib-bot added the bot: In Progress Pull request is currently awaiting automation. label Feb 11, 2026
@stdlib-bot stdlib-bot removed the bot: In Progress Pull request is currently awaiting automation. label Feb 11, 2026
@stdlib-bot
Copy link
Contributor

stdlib-bot commented Feb 11, 2026

Coverage Report

Package Statements Branches Functions Lines
stats/array/nanmskmidrange $\color{green}127/127$
$\color{green}+0.00%$
$\color{green}15/15$
$\color{green}+0.00%$
$\color{green}1/1$
$\color{green}+0.00%$
$\color{green}127/127$
$\color{green}+0.00%$

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

Comment on lines 67 to 69
nanmskmidrange(); // $ExpectError
nanmskmidrange( x, {} ); // $ExpectError
nanmskmidrange( x, mask, {} ); // $ExpectError
Copy link
Member

Choose a reason for hiding this comment

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

This should test that too few arguments is an error (i.e., nanmskmidrange( x )) rather than nanmskmidrange( x, {} ), which duplicates the second argument type error tests from the block above. The reference mskmidrange test.ts has mskmidrange( x ); here.

Suggested change
nanmskmidrange(); // $ExpectError
nanmskmidrange( x, {} ); // $ExpectError
nanmskmidrange( x, mask, {} ); // $ExpectError
nanmskmidrange(); // $ExpectError
nanmskmidrange( x ); // $ExpectError
nanmskmidrange( x, mask, {} ); // $ExpectError


#### nanmskmidrange( x, mask )

Computes the midrange of an array according to a mask, ignoring `NaN` values.
Copy link
Member

Choose a reason for hiding this comment

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

The function description here should link to the [midrange] definition, matching the reference mskmidrange package which uses Computes the [midrange][midrange] of an array according to a mask.

Suggested change
Computes the midrange of an array according to a mask, ignoring `NaN` values.
Computes the [midrange][midrange] of an array according to a mask, ignoring `NaN` values.


[@stdlib/array/base/accessor]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/accessor

[midrange]: https://en.wikipedia.org/wiki/Midrange
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
[midrange]: https://en.wikipedia.org/wiki/Midrange
[midrange]: https://en.wikipedia.org/wiki/Mid-range

@Planeshifter Planeshifter added Needs Changes Pull request which needs changes before being merged. and removed Needs Review A pull request which needs code review. labels Feb 14, 2026
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Feb 14, 2026
Copy link
Member

@Planeshifter Planeshifter left a comment

Choose a reason for hiding this comment

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

Lgtm.

@Planeshifter Planeshifter added the Ready To Merge A pull request which is ready to be merged. label Feb 15, 2026
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Feb 15, 2026
@stdlib-bot
Copy link
Contributor

PR Commit Message

feat: add `stats/array/nanmskmidrange`

PR-URL: https://github.com/stdlib-js/stdlib/pull/10224

Co-authored-by: stdlib-bot <noreply@stdlib.io>
Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>

Please review the above commit message and make any necessary adjustments.

@stdlib-bot stdlib-bot removed the Needs Changes Pull request which needs changes before being merged. label Feb 15, 2026
@Planeshifter Planeshifter merged commit 7ef3bae into stdlib-js:develop Feb 15, 2026
50 checks passed
@stdlib-bot stdlib-bot removed the Ready To Merge A pull request which is ready to be merged. label Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants