Skip to content

Commit fe60f20

Browse files
authored
chore: adds opts
PR-URL: #6908 Reviewed-by: Philipp Burckhardt <[email protected]>
1 parent 4e66536 commit fe60f20

File tree

7 files changed

+48
-24
lines changed

7 files changed

+48
-24
lines changed

lib/node_modules/@stdlib/stats/base/dists/bradford/cdf/benchmark/benchmark.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,17 @@ var cdf = require( './../lib' );
3030
// MAIN //
3131

3232
bench( pkg, function benchmark( b ) {
33+
var opts;
3334
var x;
3435
var c;
3536
var y;
3637
var i;
3738

38-
x = uniform( 100, 0.0, 1.0 );
39-
c = uniform( 100, 0.1, 10.0 );
39+
opts = {
40+
'dtype': 'float64'
41+
};
42+
x = uniform( 100, 0.0, 1.0, opts );
43+
c = uniform( 100, 0.1, 10.0, opts );
4044

4145
b.tic();
4246
for ( i = 0; i < b.iterations; i++ ) {
@@ -55,11 +59,15 @@ bench( pkg, function benchmark( b ) {
5559

5660
bench( pkg+':factory', function benchmark( b ) {
5761
var mycdf;
62+
var opts;
5863
var x;
5964
var y;
6065
var i;
6166

62-
x = uniform( 100, 0.0, 1.0 );
67+
opts = {
68+
'dtype': 'float64'
69+
};
70+
x = uniform( 100, 0.0, 1.0, opts );
6371
mycdf = cdf.factory( 5.0 );
6472

6573
b.tic();

lib/node_modules/@stdlib/stats/base/dists/bradford/cdf/test/test.cdf.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,16 @@ tape( 'if provided a number greater than or equal to one for `x` and a finite `c
7575
var y;
7676

7777
y = cdf( PINF, 0.5 );
78-
t.equal( y, 1.0, 'returns 1' );
78+
t.equal( y, 1.0, 'returns expected value' );
7979

8080
y = cdf( 100.0, 0.5 );
81-
t.equal( y, 1.0, 'returns 1' );
81+
t.equal( y, 1.0, 'returns expected value' );
8282

8383
y = cdf( 10.0, 0.5 );
84-
t.equal( y, 1.0, 'returns 1' );
84+
t.equal( y, 1.0, 'returns expected value' );
8585

8686
y = cdf( 1.0, 0.5 );
87-
t.equal( y, 1.0, 'returns 1' );
87+
t.equal( y, 1.0, 'returns expected value' );
8888

8989
t.end();
9090
});
@@ -93,16 +93,16 @@ tape( 'if provided a number less than or equal to zero for `x` and a finite `c`,
9393
var y;
9494

9595
y = cdf( NINF, 0.5 );
96-
t.equal( y, 0.0, 'returns 0' );
96+
t.equal( y, 0.0, 'returns expected value' );
9797

9898
y = cdf( -100.0, 0.5 );
99-
t.equal( y, 0.0, 'returns 0' );
99+
t.equal( y, 0.0, 'returns expected value' );
100100

101101
y = cdf( -1.0, 0.5 );
102-
t.equal( y, 0.0, 'returns 0' );
102+
t.equal( y, 0.0, 'returns expected value' );
103103

104104
y = cdf( 0.0, 0.5 );
105-
t.equal( y, 0.0, 'returns 0' );
105+
t.equal( y, 0.0, 'returns expected value' );
106106

107107
t.end();
108108
});

lib/node_modules/@stdlib/stats/base/dists/bradford/cdf/test/test.factory.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,16 @@ tape( 'if provided a finite `c`, the function returns a function which returns `
9292

9393
cdf = factory( 0.5 );
9494
y = cdf( PINF );
95-
t.equal( y, 1.0, 'returns 1' );
95+
t.equal( y, 1.0, 'returns expected value' );
9696

9797
y = cdf( 100.0 );
98-
t.equal( y, 1.0, 'returns 1' );
98+
t.equal( y, 1.0, 'returns expected value' );
9999

100100
y = cdf( 10.0 );
101-
t.equal( y, 1.0, 'returns 1' );
101+
t.equal( y, 1.0, 'returns expected value' );
102102

103103
y = cdf( 1.0 );
104-
t.equal( y, 1.0, 'returns 1' );
104+
t.equal( y, 1.0, 'returns expected value' );
105105

106106
t.end();
107107
});
@@ -112,19 +112,19 @@ tape( 'if provided a finite `c`, the function returns a function which returns `
112112

113113
cdf = factory( 0.5 );
114114
y = cdf( NINF );
115-
t.equal( y, 0.0, 'returns 0' );
115+
t.equal( y, 0.0, 'returns expected value' );
116116

117117
y = cdf( -100.0 );
118-
t.equal( y, 0.0, 'returns 0' );
118+
t.equal( y, 0.0, 'returns expected value' );
119119

120120
y = cdf( -10.0 );
121-
t.equal( y, 0.0, 'returns 0' );
121+
t.equal( y, 0.0, 'returns expected value' );
122122

123123
y = cdf( -1.0 );
124-
t.equal( y, 0.0, 'returns 0' );
124+
t.equal( y, 0.0, 'returns expected value' );
125125

126126
y = cdf( 0.0 );
127-
t.equal( y, 0.0, 'returns 0' );
127+
t.equal( y, 0.0, 'returns expected value' );
128128

129129
t.end();
130130
});

lib/node_modules/@stdlib/stats/base/dists/bradford/entropy/benchmark/benchmark.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@ var entropy = require( './../lib' );
3030
// MAIN //
3131

3232
bench( pkg, function benchmark( b ) {
33+
var opts;
3334
var c;
3435
var y;
3536
var i;
3637

37-
c = uniform( 100, 0.1, 10.0 );
38+
opts = {
39+
'dtype': 'float64'
40+
};
41+
c = uniform( 100, 0.1, 10.0, opts );
3842

3943
b.tic();
4044
for ( i = 0; i < b.iterations; i++ ) {

lib/node_modules/@stdlib/stats/base/dists/bradford/mean/benchmark/benchmark.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@ var mean = require( './../lib' );
3030
// MAIN //
3131

3232
bench( pkg, function benchmark( b ) {
33+
var opts;
3334
var c;
3435
var y;
3536
var i;
3637

37-
c = uniform( 100, 0.1, 10.0 );
38+
opts = {
39+
'dtype': 'float64'
40+
};
41+
c = uniform( 100, 0.1, 10.0, opts );
3842

3943
b.tic();
4044
for ( i = 0; i < b.iterations; i++ ) {

lib/node_modules/@stdlib/stats/base/dists/bradford/median/benchmark/benchmark.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@ var median = require( './../lib' );
3030
// MAIN //
3131

3232
bench( pkg, function benchmark( b ) {
33+
var opts;
3334
var c;
3435
var y;
3536
var i;
3637

37-
c = uniform( 100, 0.1, 10.0 );
38+
opts = {
39+
'dtype': 'float64'
40+
};
41+
c = uniform( 100, 0.1, 10.0, opts );
3842

3943
b.tic();
4044
for ( i = 0; i < b.iterations; i++ ) {

lib/node_modules/@stdlib/stats/base/dists/bradford/mode/benchmark/benchmark.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@ var mode = require( './../lib' );
3030
// MAIN //
3131

3232
bench( pkg, function benchmark( b ) {
33+
var opts;
3334
var c;
3435
var y;
3536
var i;
3637

37-
c = uniform( 100, 0.1, 10.0 );
38+
opts = {
39+
'dtype': 'float64'
40+
};
41+
c = uniform( 100, 0.1, 10.0, opts );
3842

3943
b.tic();
4044
for ( i = 0; i < b.iterations; i++ ) {

0 commit comments

Comments
 (0)