Skip to content

Commit 992578e

Browse files
authored
Merge branch 'stdlib-js:develop' into dsort_blas
2 parents 21224ca + 5b02960 commit 992578e

File tree

24 files changed

+325
-239
lines changed

24 files changed

+325
-239
lines changed

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

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,23 @@ var cdf = require( './../lib' );
3131
// MAIN //
3232

3333
bench( pkg, function benchmark( b ) {
34-
var len;
34+
var opts;
3535
var a;
3636
var s;
3737
var x;
3838
var y;
3939
var i;
4040

41-
len = 100;
42-
x = uniform( len, 0.0, 1.0 );
43-
a = uniform( len, EPS, 5.0 + EPS );
44-
s = uniform( len, EPS, 5.0 + EPS );
41+
opts = {
42+
'dtype': 'float64'
43+
};
44+
x = uniform( 100, 0.0, 1.0, opts );
45+
a = uniform( 100, EPS, 5.0 + EPS, opts );
46+
s = uniform( 100, EPS, 5.0 + EPS, opts );
4547

4648
b.tic();
4749
for ( i = 0; i < b.iterations; i++ ) {
48-
y = cdf( x[ i % len ], a[ i % len ], s[ i % len ] );
50+
y = cdf( x[ i % x.length ], a[ i % a.length ], s[ i % s.length ] );
4951
if ( isnan( y ) ) {
5052
b.fail( 'should not return NaN' );
5153
}
@@ -60,6 +62,7 @@ bench( pkg, function benchmark( b ) {
6062

6163
bench( pkg+':factory', function benchmark( b ) {
6264
var mycdf;
65+
var opts;
6366
var a;
6467
var s;
6568
var x;
@@ -69,7 +72,11 @@ bench( pkg+':factory', function benchmark( b ) {
6972
a = 100.56789;
7073
s = 55.54321;
7174
mycdf = cdf.factory( a, s );
72-
x = uniform( 100, -2.0, 2.0 );
75+
76+
opts = {
77+
'dtype': 'float64'
78+
};
79+
x = uniform( 100, -2.0, 2.0, opts );
7380

7481
b.tic();
7582
for ( i = 0; i < b.iterations; i++ ) {

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,23 @@ var opts = {
4040
// MAIN //
4141

4242
bench( pkg+'::native', opts, function benchmark( b ) {
43-
var len;
43+
var opts;
4444
var a;
4545
var s;
4646
var x;
4747
var y;
4848
var i;
4949

50-
len = 100;
51-
x = uniform( len, 0.0, 1.0 );
52-
a = uniform( len, EPS, 5.0 );
53-
s = uniform( len, EPS, 5.0 );
50+
opts = {
51+
'dtype': 'float64'
52+
};
53+
x = uniform( 100, 0.0, 1.0, opts );
54+
a = uniform( 100, EPS, 5.0, opts );
55+
s = uniform( 100, EPS, 5.0, opts );
5456

5557
b.tic();
5658
for ( i = 0; i < b.iterations; i++ ) {
57-
y = cdf( x[ i % len ], a[ i % len ], s[ i % len ] );
59+
y = cdf( x[ i % x.length ], a[ i % a.length ], s[ i % s.length ] );
5860
if ( isnan( y ) ) {
5961
b.fail( 'should not return NaN' );
6062
}

0 commit comments

Comments
 (0)