Skip to content

Commit d775d30

Browse files
committed
chore: minor cleanup in stats/strided/dcovarmtk
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: missing_dependencies - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
1 parent 8da4e68 commit d775d30

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ 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 );
137137
// returns 6.0
@@ -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)