Skip to content

Commit 4de228d

Browse files
committed
fix: benchmark files
1 parent bebc597 commit 4de228d

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

lib/node_modules/@stdlib/stats/base/nanmin-by/benchmark/benchmark.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2025 The Stdlib Authors.
4+
* Copyright (c) 2020 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@ var bernoulli = require( '@stdlib/random/base/bernoulli' );
2727
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2828
var pow = require( '@stdlib/math/base/special/pow' );
2929
var pkg = require( './../package.json' ).name;
30-
var nanminBy = require( './../lib/nanmin_by.js' );
30+
var nanminBy = require( './../lib/main.js' );
3131

3232

3333
// FUNCTIONS //
@@ -39,17 +39,23 @@ var nanminBy = require( './../lib/nanmin_by.js' );
3939
* @param {number} value - array element
4040
* @returns {number} accessed value
4141
*/
42+
function accessor( value ) {
43+
return value * 2.0;
44+
}
45+
46+
/**
47+
* Returns a random number.
48+
*
49+
* @private
50+
* @returns {number} random number
51+
*/
4252
function rand() {
43-
if( bernoulli( 0.8 ) < 1 ) {
53+
if ( bernoulli( 0.8 ) < 1 ) {
4454
return NaN;
4555
}
4656
return uniform( -50.0, 50.0 );
4757
}
4858

49-
function accessor( value ) {
50-
return value * 2.0;
51-
}
52-
5359
/**
5460
* Create a benchmark function.
5561
*

lib/node_modules/@stdlib/stats/base/nanmin-by/benchmark/benchmark.ndarray.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,23 @@ var nanminBy = require( './../lib/ndarray.js' );
3939
* @param {number} value - array element
4040
* @returns {number} accessed value
4141
*/
42+
function accessor( value ) {
43+
return value * 2.0;
44+
}
45+
46+
/**
47+
* Returns a random number.
48+
*
49+
* @private
50+
* @returns {number} random number
51+
*/
4252
function rand() {
43-
if( bernoulli( 0.8 ) < 1 ) {
53+
if ( bernoulli( 0.8 ) < 1 ) {
4454
return NaN;
4555
}
4656
return uniform( -50.0, 50.0 );
4757
}
4858

49-
function accessor( value ) {
50-
return value * 2.0;
51-
}
52-
5359
/**
5460
* Create a benchmark function.
5561
*

0 commit comments

Comments
 (0)