diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfill-not-equal/README.md b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfill-not-equal/README.md index 9a40b13b33ee..27d06cbe4566 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfill-not-equal/README.md +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfill-not-equal/README.md @@ -101,10 +101,10 @@ var opts = { var x = discreteUniform( [ 10 ], 0, 3, opts ); console.log( ndarray2array( x ) ); -var searchElement = scalar2ndarray( 1, opts ); +var searchElement = scalar2ndarray( 1.0, opts ); console.log( 'Search Element: %d', ndarraylike2scalar( searchElement ) ); -var alpha = scalar2ndarray( 5, opts ); +var alpha = scalar2ndarray( 5.0, opts ); console.log( 'Alpha: %d', ndarraylike2scalar( alpha ) ); dfillNotEqual( [ x, searchElement, alpha ] ); diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfill-not-equal/examples/index.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfill-not-equal/examples/index.js index 2b7fe55e3199..1647130cd216 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfill-not-equal/examples/index.js +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfill-not-equal/examples/index.js @@ -31,10 +31,10 @@ var opts = { var x = discreteUniform( [ 10 ], 0, 3, opts ); console.log( ndarray2array( x ) ); -var searchElement = scalar2ndarray( 1, opts ); +var searchElement = scalar2ndarray( 1.0, opts ); console.log( 'Search Element: %d', ndarraylike2scalar( searchElement ) ); -var alpha = scalar2ndarray( 5, opts ); +var alpha = scalar2ndarray( 5.0, opts ); console.log( 'Alpha: %d', ndarraylike2scalar( alpha ) ); dfillNotEqual( [ x, searchElement, alpha ] ); diff --git a/lib/node_modules/@stdlib/stats/incr/nancovariance/README.md b/lib/node_modules/@stdlib/stats/incr/nancovariance/README.md index 7d5db2b95ea0..67b88578b3e2 100644 --- a/lib/node_modules/@stdlib/stats/incr/nancovariance/README.md +++ b/lib/node_modules/@stdlib/stats/incr/nancovariance/README.md @@ -27,7 +27,7 @@ limitations under the License. ## Usage ```javascript -var nancovariance = require( '@stdlib/stats/incr/nancovariance' ); +var incrnancovariance = require( '@stdlib/stats/incr/nancovariance' ); ``` #### incrnancovariance @@ -35,7 +35,7 @@ var nancovariance = require( '@stdlib/stats/incr/nancovariance' ); Returns an accumulator function which incrementally computes a sample covariance, ignoring any input pairs that contain NaN values. The accumulator returns null until at least two valid data pairs have been provided. ```javascript -var accumulator = nancovariance(); +var accumulator = incrnancovariance(); ``` #### accumulator(`[x, y]`) @@ -43,7 +43,7 @@ var accumulator = nancovariance(); If provided a pair of numeric input values `[x, y]`, the accumulator updates and returns the sample covariance. If not provided any input values, the accumulator returns the current sample covariance. ```javascript -var accumulator = nancovariance(); +var accumulator = incrnancovariance(); var cov = accumulator(); // returns null @@ -73,13 +73,13 @@ cov = accumulator(); ```javascript var randu = require( '@stdlib/random/base/randu' ); -var nancovariance = require( '@stdlib/stats/incr/nancovariance' ); +var incrnancovariance = require( '@stdlib/stats/incr/nancovariance' ); var accumulator; var i; var x; var y; -accumulator = nancovariance(); +accumulator = incrnancovariance(); for ( i = 0; i < 100; i++ ) { x = ( randu() < 0.2 ) ? NaN : randu() * 100.0; y = ( randu() < 0.2 ) ? NaN : randu() * 100.0; diff --git a/lib/node_modules/@stdlib/stats/incr/nancovariance/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/incr/nancovariance/benchmark/benchmark.js index 5574d4884989..c3a4e8cb25c5 100644 --- a/lib/node_modules/@stdlib/stats/incr/nancovariance/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/incr/nancovariance/benchmark/benchmark.js @@ -24,7 +24,7 @@ var bench = require( '@stdlib/bench' ); var randu = require( '@stdlib/random/base/randu' ); var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; -var nancovariance = require( './../lib' ); +var incrnancovariance = require( './../lib' ); // MAIN // @@ -34,7 +34,7 @@ bench( pkg, function benchmark( b ) { var i; b.tic(); for ( i = 0; i < b.iterations; i++ ) { - acc = nancovariance(); + acc = incrnancovariance(); if ( typeof acc !== 'function' ) { b.fail( 'should return a function' ); } @@ -54,7 +54,7 @@ bench( format( '%s::accumulator', pkg ), function benchmark( b ) { var v; var i; - acc = nancovariance(); + acc = incrnancovariance(); b.tic(); for ( i = 0; i < b.iterations; i++ ) { diff --git a/lib/node_modules/@stdlib/stats/incr/nancovariance/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/incr/nancovariance/docs/types/index.d.ts index 80885c12debe..07c9093353c4 100644 --- a/lib/node_modules/@stdlib/stats/incr/nancovariance/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/stats/incr/nancovariance/docs/types/index.d.ts @@ -39,7 +39,7 @@ type accumulator = ( x?: number, y?: number ) => number | null; * @returns accumulator function * * @example -* var acc = nancovariance(); +* var acc = incrnancovariance(); * * var cov = acc(); * // returns null @@ -56,9 +56,9 @@ type accumulator = ( x?: number, y?: number ) => number | null; * cov = acc(); * // returns 4.0 */ -declare function nancovariance(): accumulator; +declare function incrnancovariance(): accumulator; // EXPORTS // -export = nancovariance; +export = incrnancovariance; diff --git a/lib/node_modules/@stdlib/stats/incr/nancovariance/docs/types/test.ts b/lib/node_modules/@stdlib/stats/incr/nancovariance/docs/types/test.ts index acbecede6cf1..0f2a8ca5e7f7 100644 --- a/lib/node_modules/@stdlib/stats/incr/nancovariance/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/incr/nancovariance/docs/types/test.ts @@ -16,32 +16,32 @@ * limitations under the License. */ -import nancovariance = require( './index' ); +import incrnancovariance = require( './index' ); // TESTS // // The function returns an accumulator function... { - nancovariance(); // $ExpectType accumulator + incrnancovariance(); // $ExpectType accumulator } // The compiler throws an error if the function is provided any arguments... { - nancovariance( 3 ); // $ExpectError - nancovariance( 3, 0.0 ); // $ExpectError + incrnancovariance( 3 ); // $ExpectError + incrnancovariance( 3, 0.0 ); // $ExpectError } // The function returns an accumulator function which returns an accumulated result... { - const acc = nancovariance(); + const acc = incrnancovariance(); acc(); // $ExpectType number | null acc( 2.0, 1.0 ); // $ExpectType number | null } // The compiler throws an error if the returned accumulator function is provided invalid arguments... { - const acc = nancovariance(); + const acc = incrnancovariance(); acc( '5', 2.0 ); // $ExpectError acc( true, 2.0 ); // $ExpectError diff --git a/lib/node_modules/@stdlib/stats/incr/nancovariance/examples/index.js b/lib/node_modules/@stdlib/stats/incr/nancovariance/examples/index.js index 47eff782e13d..445d69fa4cb5 100644 --- a/lib/node_modules/@stdlib/stats/incr/nancovariance/examples/index.js +++ b/lib/node_modules/@stdlib/stats/incr/nancovariance/examples/index.js @@ -18,9 +18,9 @@ 'use strict'; -var nancovariance = require( './../lib' ); +var incrnancovariance = require( './../lib' ); -var acc = nancovariance(); +var acc = incrnancovariance(); var dataX = [ 2.0, 2.0, NaN, 3.0, 5.0 ]; var dataY = [ 1.0, 5.0, 4.0, NaN, 5.0 ]; diff --git a/lib/node_modules/@stdlib/stats/incr/nancovariance/lib/index.js b/lib/node_modules/@stdlib/stats/incr/nancovariance/lib/index.js index 01852a1896a0..0e79ddaf073c 100644 --- a/lib/node_modules/@stdlib/stats/incr/nancovariance/lib/index.js +++ b/lib/node_modules/@stdlib/stats/incr/nancovariance/lib/index.js @@ -24,9 +24,9 @@ * @module @stdlib/stats/incr/nancovariance * * @example -* var nancovariance = require( '@stdlib/stats/incr/nancovariance' ); +* var incrnancovariance = require( '@stdlib/stats/incr/nancovariance' ); * -* var acc = nancovariance(); +* var acc = incrnancovariance(); * * var cov = acc(); * // returns null diff --git a/lib/node_modules/@stdlib/stats/incr/nancovariance/lib/main.js b/lib/node_modules/@stdlib/stats/incr/nancovariance/lib/main.js index 5b5e68fb71dc..18ce017b43e4 100644 --- a/lib/node_modules/@stdlib/stats/incr/nancovariance/lib/main.js +++ b/lib/node_modules/@stdlib/stats/incr/nancovariance/lib/main.js @@ -32,9 +32,9 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' ); * @returns {Function} accumulator function * * @example -* var nancovariance = require( '@stdlib/stats/incr/nancovariance' ); +* var incrnancovariance = require( '@stdlib/stats/incr/nancovariance' ); * -* var acc = nancovariance(); +* var acc = incrnancovariance(); * * var cov = acc(); * // returns null @@ -51,7 +51,7 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' ); * cov = acc(); * // returns 4.0 */ -function nancovariance() { +function incrnancovariance() { var count = 0; var acc = covariance(); return accumulator; @@ -82,4 +82,4 @@ function nancovariance() { // EXPORTS // -module.exports = nancovariance; +module.exports = incrnancovariance; diff --git a/lib/node_modules/@stdlib/stats/incr/nancovariance/test/test.js b/lib/node_modules/@stdlib/stats/incr/nancovariance/test/test.js index e3df6c4ba79a..e0e6dd47344e 100644 --- a/lib/node_modules/@stdlib/stats/incr/nancovariance/test/test.js +++ b/lib/node_modules/@stdlib/stats/incr/nancovariance/test/test.js @@ -23,25 +23,25 @@ var tape = require( 'tape' ); var abs = require( '@stdlib/math/base/special/abs' ); var EPS = require( '@stdlib/constants/float64/eps' ); -var nancovariance = require( './../lib' ); +var incrnancovariance = require( './../lib' ); // TESTS // tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); - t.strictEqual( typeof nancovariance, 'function', 'main export is a function' ); + t.strictEqual( typeof incrnancovariance, 'function', 'main export is a function' ); t.end(); }); tape( 'the function returns an accumulator function', function test( t ) { - var acc = nancovariance(); + var acc = incrnancovariance(); t.strictEqual( typeof acc, 'function', 'returns a function' ); t.end(); }); tape( 'the accumulator function returns null if no valid pairs have been provided', function test( t ) { - var acc = nancovariance(); + var acc = incrnancovariance(); t.equal( acc(), null, 'returns null initially' ); // Provide an invalid pair: @@ -51,7 +51,7 @@ tape( 'the accumulator function returns null if no valid pairs have been provide }); tape( 'the accumulator function returns null if only one valid pair has been provided', function test( t ) { - var acc = nancovariance(); + var acc = incrnancovariance(); // Add the first valid pair: acc( 2.0, 1.0 ); @@ -60,7 +60,7 @@ tape( 'the accumulator function returns null if only one valid pair has been pro }); tape( 'the accumulator function computes sample covariance once two valid pairs have been provided', function test( t ) { - var acc = nancovariance(); + var acc = incrnancovariance(); var cov; // Pair #1: @@ -77,7 +77,7 @@ tape( 'the accumulator function computes sample covariance once two valid pairs }); tape( 'the accumulator function skips pairs containing NaN', function test( t ) { - var acc = nancovariance(); + var acc = incrnancovariance(); var cov; // Provide first valid pair: @@ -110,7 +110,7 @@ tape( 'the accumulator function computes correct covariance for multiple valid p [ NaN, NaN ], [ 5.0, 11.0 ] ]; - var acc = nancovariance(); + var acc = incrnancovariance(); var cov; var tol; var i; diff --git a/lib/node_modules/@stdlib/stats/incr/nanewvariance/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/incr/nanewvariance/benchmark/benchmark.js index 31302d039195..ee2fc06627cb 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanewvariance/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/incr/nanewvariance/benchmark/benchmark.js @@ -24,7 +24,7 @@ var bench = require( '@stdlib/bench' ); var randu = require( '@stdlib/random/base/randu' ); var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; -var nanewvariance = require( './../lib' ); +var incrnanewvariance = require( './../lib' ); // MAIN // @@ -34,7 +34,7 @@ bench( pkg, function benchmark( b ) { var i; b.tic(); for ( i = 0; i < b.iterations; i++ ) { - f = nanewvariance( 0.5 ); + f = incrnanewvariance( 0.5 ); if ( typeof f !== 'function' ) { b.fail( 'should return a function' ); } @@ -51,7 +51,7 @@ bench( format( '%s::accumulator', pkg ), function benchmark( b ) { var acc; var v; var i; - acc = nanewvariance( 0.5 ); + acc = incrnanewvariance( 0.5 ); b.tic(); for ( i = 0; i < b.iterations; i++ ) { v = acc( randu() ); diff --git a/lib/node_modules/@stdlib/stats/incr/nanewvariance/docs/types/test.ts b/lib/node_modules/@stdlib/stats/incr/nanewvariance/docs/types/test.ts index ae83d18dc3d5..01fbe4b7aed5 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanewvariance/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/incr/nanewvariance/docs/types/test.ts @@ -16,38 +16,38 @@ * limitations under the License. */ -import nanewvariance = require( './index' ); +import incrnanewvariance = require( './index' ); // TESTS // // The function returns an accumulator function... { - nanewvariance( 0.5 ); // $ExpectType accumulator + incrnanewvariance( 0.5 ); // $ExpectType accumulator } // The compiler throws an error if the function is provided an argument that is not a number... { - nanewvariance( '5' ); // $ExpectError - nanewvariance( true ); // $ExpectError - nanewvariance( false ); // $ExpectError - nanewvariance( null ); // $ExpectError - nanewvariance( undefined ); // $ExpectError - nanewvariance( [] ); // $ExpectError - nanewvariance( {} ); // $ExpectError - nanewvariance( ( x: number ): number => x ); // $ExpectError + incrnanewvariance( '5' ); // $ExpectError + incrnanewvariance( true ); // $ExpectError + incrnanewvariance( false ); // $ExpectError + incrnanewvariance( null ); // $ExpectError + incrnanewvariance( undefined ); // $ExpectError + incrnanewvariance( [] ); // $ExpectError + incrnanewvariance( {} ); // $ExpectError + incrnanewvariance( ( x: number ): number => x ); // $ExpectError } // The function returns an accumulator function which returns an accumulated result... { - const acc = nanewvariance( 0.5 ); + const acc = incrnanewvariance( 0.5 ); acc(); // $ExpectType number | null acc( 3.14 ); // $ExpectType number | null } // The compiler throws an error if the returned accumulator function is provided invalid arguments... { - const acc = nanewvariance( 0.5 ); + const acc = incrnanewvariance( 0.5 ); acc( '5' ); // $ExpectError acc( true ); // $ExpectError acc( false ); // $ExpectError diff --git a/lib/node_modules/@stdlib/stats/incr/nanewvariance/examples/index.js b/lib/node_modules/@stdlib/stats/incr/nanewvariance/examples/index.js index e690b056e08d..c417adf8909a 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanewvariance/examples/index.js +++ b/lib/node_modules/@stdlib/stats/incr/nanewvariance/examples/index.js @@ -20,7 +20,7 @@ var randu = require( '@stdlib/random/base/randu' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); -var nanewvariance = require( './..' ); +var incrnanewvariance = require( './..' ); var accumulator; var s2; @@ -28,7 +28,7 @@ var v; var i; // Initialize an accumulator: -accumulator = nanewvariance( 0.5 ); +accumulator = incrnanewvariance( 0.5 ); // For each simulated datum, update the exponentially weighted variance... console.log( '\nValue\tVariance\n' ); diff --git a/lib/node_modules/@stdlib/stats/incr/nanewvariance/test/test.js b/lib/node_modules/@stdlib/stats/incr/nanewvariance/test/test.js index 87bb602bec78..2ab82afe8045 100644 --- a/lib/node_modules/@stdlib/stats/incr/nanewvariance/test/test.js +++ b/lib/node_modules/@stdlib/stats/incr/nanewvariance/test/test.js @@ -21,7 +21,7 @@ // MODULES // var tape = require( 'tape' ); -var nanewvariance = require( './../lib' ); +var incrnanewvariance = require( './../lib' ); // TESTS // @@ -32,7 +32,7 @@ tape( 'main export is a function', function test( t ) { }); tape( 'the initial accumulated value is `null`', function test( t ) { - var acc = nanewvariance( 0.5 ); + var acc = incrnanewvariance( 0.5 ); t.strictEqual( acc(), null, 'returns null initially' ); t.end(); }); @@ -55,7 +55,7 @@ tape( 'the accumulator function incrementally computes an exponentially weighted ]; actual = []; - acc = nanewvariance( 0.5 ); + acc = incrnanewvariance( 0.5 ); for ( i = 0; i < data.length; i++ ) { actual.push( acc( data[ i ] ) ); } @@ -69,7 +69,7 @@ tape( 'if not provided an input value, accumulator returns current variance', fu var i; data = [ 2.0, 3.0, 1.0 ]; - acc = nanewvariance( 0.5 ); + acc = incrnanewvariance( 0.5 ); for ( i = 0; i < data.length; i++ ) { acc( data[ i ] ); } @@ -78,7 +78,7 @@ tape( 'if not provided an input value, accumulator returns current variance', fu }); tape( 'the accumulator function skips NaN inputs', function test( t ) { - var acc = nanewvariance( 0.5 ); + var acc = incrnanewvariance( 0.5 ); var v; v = acc( 2.0 );