Skip to content

Conversation

@hrshya
Copy link
Contributor

@hrshya hrshya commented Jan 16, 2026

Resolves none .

Description

What is the purpose of this pull request?

This pull request:

  • Refactors random number generation in JS benchmarks for the stats/base/dists/negative-binomial/* packages.
  • Replaces uniform() from @stdlib/random/array/uniform for cleaner and more consistent code.
  • Moves the random number generation outside the benchmarking loops.
  • Updates the test messages to follow code conventions.

Related Issues

Does this pull request have any related issues?

This pull request:

  • resolves no related issues.

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. Needs Review A pull request which needs code review. labels Jan 16, 2026
@stdlib-bot
Copy link
Contributor

stdlib-bot commented Jan 16, 2026

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/negative-binomial/cdf $\color{green}272/272$
$\color{green}+0.00%$
$\color{green}29/29$
$\color{green}+0.00%$
$\color{green}3/3$
$\color{green}+0.00%$
$\color{green}272/272$
$\color{green}+0.00%$
stats/base/dists/negative-binomial/kurtosis $\color{green}193/193$
$\color{green}+0.00%$
$\color{green}11/11$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}193/193$
$\color{green}+0.00%$
stats/base/dists/negative-binomial/logpmf $\color{red}523/566$
$\color{green}+0.00%$
$\color{red}45/51$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{red}523/566$
$\color{green}+0.00%$
stats/base/dists/negative-binomial/mean $\color{green}197/197$
$\color{green}+0.00%$
$\color{green}12/12$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}197/197$
$\color{green}+0.00%$
stats/base/dists/negative-binomial/mode $\color{green}194/194$
$\color{green}+0.00%$
$\color{green}11/11$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}194/194$
$\color{green}+0.00%$
stats/base/dists/negative-binomial/pmf $\color{red}532/562$
$\color{green}+0.00%$
$\color{red}49/57$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{red}532/562$
$\color{green}+0.00%$
stats/base/dists/negative-binomial/quantile $\color{green}402/402$
$\color{green}+0.00%$
$\color{green}52/52$
$\color{green}+0.00%$
$\color{green}5/5$
$\color{green}+0.00%$
$\color{green}402/402$
$\color{green}+0.00%$
stats/base/dists/negative-binomial/skewness $\color{green}194/194$
$\color{green}+0.00%$
$\color{green}11/11$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}194/194$
$\color{green}+0.00%$
stats/base/dists/negative-binomial/stdev $\color{green}194/194$
$\color{green}+0.00%$
$\color{green}11/11$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}194/194$
$\color{green}+0.00%$
stats/base/dists/negative-binomial/variance $\color{green}189/189$
$\color{green}+0.00%$
$\color{green}11/11$
$\color{green}+0.00%$
$\color{green}2/2$
$\color{green}+0.00%$
$\color{green}189/189$
$\color{green}+0.00%$

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

Signed-off-by: Harsh <149176984+hrshya@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review A pull request which needs code review. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants