diff --git a/lib/node_modules/@stdlib/stats/base/ndarray/dmeanors/README.md b/lib/node_modules/@stdlib/stats/base/ndarray/dmeanors/README.md index 4621173c2388..a7ed2d5272be 100644 --- a/lib/node_modules/@stdlib/stats/base/ndarray/dmeanors/README.md +++ b/lib/node_modules/@stdlib/stats/base/ndarray/dmeanors/README.md @@ -204,49 +204,49 @@ double stdlib_stats_dmeanors( const struct ndarray *arrays[] ); #include int main( void ) { - // Create a data buffer: - const double data[] = { 1.0, -2.0, 3.0, -4.0, 5.0, -6.0, 7.0, -8.0 }; + // Create a data buffer: + const double data[] = { 1.0, -2.0, 3.0, -4.0, 5.0, -6.0, 7.0, -8.0 }; - // Specify the number of array dimensions: - const int64_t ndims = 1; + // Specify the number of array dimensions: + const int64_t ndims = 1; // Specify the array shape: - int64_t shape[] = { 4 }; + int64_t shape[] = { 4 }; - // Specify the array strides: - int64_t strides[] = { 2*STDLIB_NDARRAY_FLOAT64_BYTES_PER_ELEMENT }; + // Specify the array strides: + int64_t strides[] = { 2*STDLIB_NDARRAY_FLOAT64_BYTES_PER_ELEMENT }; - // Specify the byte offset: - const int64_t offset = 0; + // Specify the byte offset: + const int64_t offset = 0; - // Specify the array order: - const enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; + // Specify the array order: + const enum STDLIB_NDARRAY_ORDER order = STDLIB_NDARRAY_ROW_MAJOR; - // Specify the index mode: - const enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; + // Specify the index mode: + const enum STDLIB_NDARRAY_INDEX_MODE imode = STDLIB_NDARRAY_INDEX_ERROR; - // Specify the subscript index modes: - int8_t submodes[] = { STDLIB_NDARRAY_INDEX_ERROR }; - const int64_t nsubmodes = 1; + // Specify the subscript index modes: + int8_t submodes[] = { STDLIB_NDARRAY_INDEX_ERROR }; + const int64_t nsubmodes = 1; - // Create an ndarray: - struct ndarray *x = stdlib_ndarray_allocate( STDLIB_NDARRAY_FLOAT64, (uint8_t *)data, ndims, shape, strides, offset, order, imode, nsubmodes, submodes ); - if ( x == NULL ) { - fprintf( stderr, "Error allocating memory.\n" ); - exit( 1 ); - } + // Create an ndarray: + struct ndarray *x = stdlib_ndarray_allocate( STDLIB_NDARRAY_FLOAT64, (uint8_t *)data, ndims, shape, strides, offset, order, imode, nsubmodes, submodes ); + if ( x == NULL ) { + fprintf( stderr, "Error allocating memory.\n" ); + exit( 1 ); + } - // Define a list of ndarrays: - const struct ndarray *arrays[] = { x }; + // Define a list of ndarrays: + const struct ndarray *arrays[] = { x }; - // Compute the arithmetic mean value: - double v = stdlib_stats_dmeanors( arrays ); + // Compute the arithmetic mean value: + double v = stdlib_stats_dmeanors( arrays ); - // Print the result: - printf( "mean: %lf\n", v ); + // Print the result: + printf( "mean: %lf\n", v ); - // Free allocated memory: - stdlib_ndarray_free( x ); + // Free allocated memory: + stdlib_ndarray_free( x ); } ``` diff --git a/lib/node_modules/@stdlib/stats/base/ndarray/dnanstdevch/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/ndarray/dnanstdevch/benchmark/benchmark.js index 7d5c4db9d893..02bbd47bbe39 100644 --- a/lib/node_modules/@stdlib/stats/base/ndarray/dnanstdevch/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/ndarray/dnanstdevch/benchmark/benchmark.js @@ -86,8 +86,8 @@ function createBenchmark( len ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { v = dnanstdevch( [ x, correction ] ); - if ( typeof v !== 'number' ) { - b.fail( 'should return a number' ); + if ( isnan( v ) ) { + b.fail( 'should not return NaN' ); } } b.toc(); diff --git a/lib/node_modules/@stdlib/stats/strided/snanmskminabs/README.md b/lib/node_modules/@stdlib/stats/strided/snanmskminabs/README.md index 19c93c31cb6c..7f8f910afba3 100644 --- a/lib/node_modules/@stdlib/stats/strided/snanmskminabs/README.md +++ b/lib/node_modules/@stdlib/stats/strided/snanmskminabs/README.md @@ -61,7 +61,7 @@ The function has the following parameters: - **mask**: mask [`Uint8Array`][@stdlib/array/uint8]. If a `mask` array element is `0`, the corresponding element in `x` is considered valid and **included** in computation. If a `mask` array element is `1`, the corresponding element in `x` is considered invalid/missing and **excluded** from computation. - **strideMask**: stride length for `mask`. -The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to compute the minimum absolute value of every other element in `x`, +The `N` and stride parameters determine which elements in the strided arrays are accessed at runtime. For example, to compute the minimum absolute value of every other element in `x`, ```javascript var Float32Array = require( '@stdlib/array/float32' );