Skip to content

Commit 4928d86

Browse files
committed
bench: refactor random number generation in stats/base/dists/normal
--- 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: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 5720f6c commit 4928d86

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/node_modules/@stdlib/stats/base/dists/normal/pdf/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ bench( pkg, function benchmark( b ) {
5151

5252
b.tic();
5353
for ( i = 0; i < b.iterations; i++ ) {
54-
y = pdf( x[ i % 100 ], mu[ i % 100 ], sigma[ i % 100 ] );
54+
y = pdf( x[ i % len ], mu[ i % len ], sigma[ i % len ] );
5555
if ( isnan( y ) ) {
5656
b.fail( 'should not return NaN' );
5757
}

lib/node_modules/@stdlib/stats/base/dists/normal/quantile/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ bench( pkg, function benchmark( b ) {
5151

5252
b.tic();
5353
for ( i = 0; i < b.iterations; i++ ) {
54-
y = quantile( p[ i % 100 ], mu[ i % 100 ], sigma[ i % 100 ] );
54+
y = quantile( p[ i % len ], mu[ i % len ], sigma[ i % len ] );
5555
if ( isnan( y ) ) {
5656
b.fail( 'should not return NaN' );
5757
}

0 commit comments

Comments
 (0)