Skip to content

Commit 8bb4f88

Browse files
authored
chore: minor cleanup in stats/strided/dcovarmtk
PR-URL: #7651 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent 3447088 commit 8bb4f88

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

lib/node_modules/@stdlib/stats/strided/dcovarmtk/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ The `N` and stride parameters determine which elements in the strided arrays are
131131
var Float64Array = require( '@stdlib/array/float64' );
132132

133133
var x = new Float64Array( [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0 ] );
134-
var y = new Float64Array( [ -7.0, 2.0, 2.0, 1.0, -2.0, 2.0, 3.0, 4.0 ] );
134+
var y = new Float64Array( [ 2.0, 1.0, 2.0, 1.0, -2.0, 2.0, 3.0, 4.0 ] );
135135

136136
var v = dcovarmtk( 4, 1, 1.25, x, 2, 1.25, y, 2 );
137-
// returns 6.0
137+
// returns 5.25
138138
```
139139

140140
Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
@@ -342,7 +342,7 @@ int main( void ) {
342342
const int strideX = 2;
343343

344344
// Compute the covariance of `x` with itself:
345-
double v = stdlib_strided_dcovarmtk( N, 1, 4.5, x, strideX, 4.5, x, -strideX );
345+
double v = stdlib_strided_dcovarmtk( N, 1.0, 4.5, x, strideX, 4.5, x, -strideX );
346346

347347
// Print the result:
348348
printf( "covariance: %lf\n", v );

lib/node_modules/@stdlib/stats/strided/dcovarmtk/docs/repl.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
{{alias}}( N, correction, meanx, x, strideX, meany, y, strideY )
2+
{{alias}}( N, correction, meanx, x, sx, meany, y, sy )
33
Computes the covariance of two double-precision floating-point strided
44
arrays provided known means and using a one-pass textbook algorithm.
55

@@ -34,7 +34,7 @@
3434
x: Float64Array
3535
First input array.
3636

37-
strideX: integer
37+
sx: integer
3838
Stride length of `x`.
3939

4040
meany: number
@@ -43,7 +43,7 @@
4343
y: Float64Array
4444
Second input array.
4545

46-
strideY: integer
46+
sy: integer
4747
Stride length of `y`.
4848

4949
Returns

lib/node_modules/@stdlib/stats/strided/dcovarmtk/docs/types/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import dcovarmtk = require( './index' );
3939
dcovarmtk( undefined, 1, 0.0, x, 1, 0.0, x, 1 ); // $ExpectError
4040
dcovarmtk( [], 1, 0.0, x, 1, 0.0, x, 1 ); // $ExpectError
4141
dcovarmtk( {}, 1, 0.0, x, 1, 0.0, x, 1 ); // $ExpectError
42-
dcovarmtk( ( x: number ): number => x, 1, 0.0, x, 1, 0.0, x, 1, 0.0, x, 1 ); // $ExpectError
42+
dcovarmtk( ( x: number ): number => x, 1, 0.0, x, 1, 0.0, x, 1 ); // $ExpectError
4343
}
4444

4545
// The compiler throws an error if the function is provided a second argument which is not a number...

lib/node_modules/@stdlib/stats/strided/dcovarmtk/src/addon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
4141
STDLIB_NAPI_ARGV_DOUBLE( env, meany, argv, 5 );
4242
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 4 );
4343
STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 7 );
44-
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 3 )
45-
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, Y, N, strideY, argv, 6 )
44+
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 3 );
45+
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, Y, N, strideY, argv, 6 );
4646
STDLIB_NAPI_CREATE_DOUBLE( env, API_SUFFIX(stdlib_strided_dcovarmtk)( N, correction, meanx, X, strideX, meany, Y, strideY ), v );
4747
return v;
4848
}

0 commit comments

Comments
 (0)