diff --git a/lib/node_modules/@stdlib/constants/float32/ninf/lib/index.js b/lib/node_modules/@stdlib/constants/float32/ninf/lib/index.js index 724b622afa4b..a2d6403dcee0 100644 --- a/lib/node_modules/@stdlib/constants/float32/ninf/lib/index.js +++ b/lib/node_modules/@stdlib/constants/float32/ninf/lib/index.js @@ -26,7 +26,7 @@ * * @example * var FLOAT32_NINF = require( '@stdlib/constants/float32/ninf' ); -* // returns -infinity +* // returns -Infinity */ // MODULES // diff --git a/lib/node_modules/@stdlib/random/sample/lib/renormalizing.js b/lib/node_modules/@stdlib/random/sample/lib/renormalizing.js index eb09a5f8ec96..c26943dbc887 100644 --- a/lib/node_modules/@stdlib/random/sample/lib/renormalizing.js +++ b/lib/node_modules/@stdlib/random/sample/lib/renormalizing.js @@ -43,11 +43,9 @@ function renormalizing( x, size, rand, probabilities ) { var u; N = x.length; - probs = new Array( N ); - for ( i = 0; i < N; i++ ) { - probs[ i ] = probabilities[ i ]; - } - out = new Array( size ); + probs = probabilities.slice(); + + out = []; for ( i = 0; i < size; i++ ) { u = rand(); psum = 0; @@ -64,7 +62,7 @@ function renormalizing( x, size, rand, probabilities ) { probs[ k ] /= 1.0 - probs[ j ]; } probs[ j ] = 0.0; - out[ i ] = x[ j ]; + out.push( x[ j ] ); } return out; }