Skip to content

Commit b14520a

Browse files
committed
Fix failing tests and update example
1 parent aa2f9ea commit b14520a

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

lib/node_modules/@stdlib/random/base/binomial/README.md

-3
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ var rand;
233233
var i;
234234

235235
// Generate pseudorandom numbers...
236-
console.log( '\nseed: %d', binomial.SEED );
237236
for ( i = 0; i < 100; i++ ) {
238237
console.log( binomial( 20, 0.5 ) );
239238
}
@@ -243,7 +242,6 @@ seed = 1234;
243242
rand = binomial.factory( 10, 0.8, {
244243
'seed': seed
245244
});
246-
console.log( '\nseed: %d', seed );
247245
for ( i = 0; i < 100; i++ ) {
248246
console.log( rand() );
249247
}
@@ -252,7 +250,6 @@ for ( i = 0; i < 100; i++ ) {
252250
rand = binomial.factory( 20, 0.5, {
253251
'seed': binomial.SEED
254252
});
255-
console.log( '\nseed: %d', binomial.SEED );
256253
for ( i = 0; i < 100; i++ ) {
257254
console.log( rand() );
258255
}

lib/node_modules/@stdlib/random/base/binomial/examples/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var rand;
2525
var i;
2626

2727
// Generate pseudorandom numbers...
28-
console.log( '\nseed: %d', binomial.SEED );
28+
console.log( '\nseed: %d', binomial.SEED[ 0 ] );
2929
for ( i = 0; i < 100; i++ ) {
3030
console.log( binomial( 20, 0.5 ) );
3131
}
@@ -44,7 +44,7 @@ for ( i = 0; i < 100; i++ ) {
4444
rand = binomial.factory( 20, 0.5, {
4545
'seed': binomial.SEED
4646
});
47-
console.log( '\nseed: %d', binomial.SEED );
47+
console.log( '\nseed: %d', binomial.SEED[ 0 ] );
4848
for ( i = 0; i < 100; i++ ) {
4949
console.log( rand() );
5050
}

lib/node_modules/@stdlib/random/base/binomial/test/test.factory.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ tape( 'attached to the returned function is the generator seed', function test(
158158
var binomial = factory({
159159
'seed': 12345
160160
});
161-
t.equal( typeof binomial.SEED, 'number', 'has `SEED` property' );
162-
t.equal( binomial.SEED, 12345, 'equal to provided seed' );
161+
t.equal( isUint32Array( binomial.SEED ), true, 'has `SEED` property' );
162+
t.equal( binomial.SEED[ 0 ], 12345, 'equal to provided seed' );
163163
t.end();
164164
});
165165

lib/node_modules/@stdlib/random/base/binomial/test/test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ tape( 'attached to the main export is the underlying PRNG', function test( t ) {
5252
});
5353

5454
tape( 'attached to the main export is the generator seed', function test( t ) {
55-
t.equal( typeof binomial.SEED, 'number', 'has `SEED` property' );
55+
t.equal( isUint32Array( binomial.SEED ), true, 'has `SEED` property' );
5656
t.end();
5757
});
5858

0 commit comments

Comments
 (0)