Skip to content

Commit 6d3d7df

Browse files
fix: fixed minor error
--- 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: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - 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: passed - task: lint_c_examples status: passed - 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: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: passed - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: passed ---
1 parent ee78bc0 commit 6d3d7df

File tree

7 files changed

+6
-42
lines changed

7 files changed

+6
-42
lines changed

lib/node_modules/@stdlib/stats/base/dmeanpn/examples/c/example.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,10 @@
2222

2323
int main( void ) {
2424
// Create a strided array:
25-
double x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
26-
27-
// Specify the number of elements:
28-
int64_t N = 4;
29-
30-
// Specify the stride length:
31-
int64_t strideX = 2;
25+
const double x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
3226

3327
// Compute the arithmetic mean:
34-
double v = stdlib_strided_dmeanpn( N, x, strideX );
28+
double v = stdlib_strided_dmeanpn( 4, x, 2 );
3529

3630
// Print the result:
3731
printf( "mean: %lf\n", v );

lib/node_modules/@stdlib/stats/base/dmeanpn/include/stdlib/stats/base/dmeanpn.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,7 @@ extern "C" {
3434
double API_SUFFIX( stdlib_strided_dmeanpn )( const CBLAS_INT N, const double *X, const CBLAS_INT strideX );
3535

3636
/**
37-
<<<<<<< HEAD
38-
* Computes the arithmetic mean of a double-precision floating-point strided array using a two-pass error correction algorithm.
39-
=======
4037
* Computes the arithmetic mean of a double-precision floating-point strided array using a two-pass error correction algorithm and alternative indexing semantics.
41-
>>>>>>> 19798de3f (feat: add C ndarray implementation for stats/base/dmeanpn)
4238
*/
4339
double API_SUFFIX( stdlib_strided_dmeanpn_ndarray )( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX );
4440

lib/node_modules/@stdlib/stats/base/dmeanpn/lib/dmeanpn.native.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ var addon = require( './../src/addon.node' );
3838
*
3939
* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );
4040
*
41-
<<<<<<< HEAD
42-
* var v = dmeanpn( N, x, 1 );
43-
=======
4441
* var v = dmeanpn( 3, x, 1 );
45-
>>>>>>> 19798de3f (feat: add C ndarray implementation for stats/base/dmeanpn)
4642
* //returns ~0.3333
4743
*/
4844
function dmeanpn( N, x, strideX ) {

lib/node_modules/@stdlib/stats/base/dmeanpn/lib/ndarray.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var dapxsumpw = require( '@stdlib/blas/ext/base/dapxsumpw' ).ndarray;
2727
// MAIN //
2828

2929
/**
30-
* Computes the arithmetic mean of a double-precision floating-point strided array using a two-pass error correction algorithm.
30+
* Computes the arithmetic mean of a double-precision floating-point strided array using a two-pass error correction algorithm and alternative indexing semantics.
3131
*
3232
* ## Method
3333
*

lib/node_modules/@stdlib/stats/base/dmeanpn/lib/ndarray.native.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var addon = require( './../src/addon.node' );
2626
// MAIN //
2727

2828
/**
29-
* Computes the arithmetic mean of a double-precision floating-point strided array using a two-pass error correction algorithm.
29+
* Computes the arithmetic mean of a double-precision floating-point strided array using a two-pass error correction algorithm and alternative indexing semantics.
3030
*
3131
* @param {PositiveInteger} N - number of indexed elements
3232
* @param {Float64Array} x - input array
@@ -40,11 +40,8 @@ var addon = require( './../src/addon.node' );
4040
*
4141
* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
4242
*
43-
<<<<<<< HEAD
44-
* var v = dmeanpn( N, x, 2, 1 );
45-
=======
4643
* var v = dmeanpn( 4, x, 2, 1 );
47-
>>>>>>> 19798de3f (feat: add C ndarray implementation for stats/base/dmeanpn)
44+
*
4845
* //returns 1.25
4946
*/
5047
function dmeanpn( N, x, strideX, offsetX ) {

lib/node_modules/@stdlib/stats/base/dmeanpn/src/addon.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
*/
1818

1919
#include "stdlib/stats/base/dmeanpn.h"
20-
#include "stdlib/blas/base/shared.h"
2120
#include "stdlib/napi/export.h"
2221
#include "stdlib/napi/argv.h"
2322
#include "stdlib/napi/argv_int64.h"

lib/node_modules/@stdlib/stats/base/dmeanpn/src/main.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,6 @@
2525
/**
2626
* Computes the arithmetic mean of a double-precision floating-point strided array using a two-pass error correction algorithm.
2727
*
28-
* ## Method
29-
*
30-
* - This implementation uses a two-pass approach, as suggested by Neely (1966).
31-
*
32-
* ## References
33-
*
34-
* - Neely, Peter M. 1966. "Comparison of Several Algorithms for Computation of Means, Standard Deviations and Correlation Coefficients." _Communications of the ACM_ 9 (7). Association for Computing Machinery: 496–99. doi:[10.1145/365719.365958](https://doi.org/10.1145/365719.365958).
35-
* - Schubert, Erich, and Michael Gertz. 2018. "Numerically Stable Parallel Computation of (Co-)Variance." In _Proceedings of the 30th International Conference on Scientific and Statistical Database Management_. New York, NY, USA: Association for Computing Machinery. doi:[10.1145/3221269.3223036](https://doi.org/10.1145/3221269.3223036).
36-
*
3728
* @param N number of indexed elements
3829
* @param X input array
3930
* @param strideX strideX length
@@ -45,16 +36,7 @@ double API_SUFFIX( stdlib_strided_dmeanpn )( const CBLAS_INT N, const double *X,
4536
}
4637

4738
/**
48-
* Computes the arithmetic mean of a double-precision floating-point strided array using a two-pass error correction algorithm.
49-
*
50-
* ## Method
51-
*
52-
* - This implementation uses a two-pass approach, as suggested by Neely (1966).
53-
*
54-
* ## References
55-
*
56-
* - Neely, Peter M. 1966. "Comparison of Several Algorithms for Computation of Means, Standard Deviations and Correlation Coefficients." _Communications of the ACM_ 9 (7). Association for Computing Machinery: 496–99. doi:[10.1145/365719.365958](https://doi.org/10.1145/365719.365958).
57-
* - Schubert, Erich, and Michael Gertz. 2018. "Numerically Stable Parallel Computation of (Co-)Variance." In _Proceedings of the 30th International Conference on Scientific and Statistical Database Management_. New York, NY, USA: Association for Computing Machinery. doi:[10.1145/3221269.3223036](https://doi.org/10.1145/3221269.3223036).
39+
* Computes the arithmetic mean of a double-precision floating-point strided array using a two-pass error correction algorithm and alternative indexing semantics.
5840
*
5941
* @param N - number of indexed elements
6042
* @param x - input array

0 commit comments

Comments
 (0)