Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: cleanup
---
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: na
  - 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: 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: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
  • Loading branch information
Om-A-osc committed Apr 7, 2026
commit a5e744bee680c614c48ddd5728108a8737a680b9
23 changes: 14 additions & 9 deletions lib/node_modules/@stdlib/stats/strided/dnancount/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ var v = dnancount.ndarray( 4, x, 2, 1 );
## Notes

- If `N <= 0`, both functions return `0`.
- If `strideX == 0`, the same indexed element is evaluated `N` times.
- The C APIs return `CBLAS_INT`.

</section>

Expand Down Expand Up @@ -179,7 +177,10 @@ console.log( v );
Computes the number of non-`NaN` elements in a double-precision floating-point strided array.

```c
CBLAS_INT stdlib_strided_dnancount( const CBLAS_INT N, const double *X, const CBLAS_INT strideX );
const double x[] = { 1.0, 2.0, NaN, 4.0, 5.0, 6.0, NaN, 8.0 };

CBLAS_INT v = stdlib_strided_dnancount( 4, x, 2 );
Comment thread
Om-A-osc marked this conversation as resolved.
Outdated
// returns 2
```
Comment thread
Om-A-osc marked this conversation as resolved.

The function accepts the following arguments:
Expand All @@ -189,10 +190,7 @@ The function accepts the following arguments:
- **strideX**: `[in] CBLAS_INT` stride length for `X`.

```c
const double x[] = { 1.0, 2.0, NaN, 4.0, 5.0, 6.0, NaN, 8.0 };

CBLAS_INT v = stdlib_strided_dnancount( 4, x, 2 );
// returns 2
CBLAS_INT stdlib_strided_dnancount( const CBLAS_INT N, const double *X, const CBLAS_INT strideX );
```

#### stdlib_strided_dnancount_ndarray( N, \*X, strideX, offsetX )
Expand Down Expand Up @@ -238,13 +236,20 @@ CBLAS_INT v = stdlib_strided_dnancount_ndarray( 4, x, 2, 1 );
#include <stdio.h>

int main( void ) {
// Create a strided array:
const double x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 0.0/0.0, 0.0/0.0 };

// Specify the number of elements:
const int N = 5;

// Specify the stride length:
const int strideX = 2;

CBLAS_INT v = stdlib_strided_dnancount( N, x, strideX );
// Compute the number of non-NaN elements:
int v = stdlib_strided_dnancount( N, x, strideX );

printf( "count: %d\n", (int)v );
// Print the result:
printf( "count: %d\n", v );
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ int main( void ) {
const int strideX = 2;

// Compute the number of non-NaN elements:
CBLAS_INT v = stdlib_strided_dnancount( N, x, strideX );
int v = stdlib_strided_dnancount( N, x, strideX );

// Print the result:
printf( "count: %d\n", (int)v );
printf( "count: %d\n", v );
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ CBLAS_INT API_SUFFIX(stdlib_strided_dnancount)( const CBLAS_INT N, const double
CBLAS_INT API_SUFFIX(stdlib_strided_dnancount_ndarray)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ) {
CBLAS_INT count;
CBLAS_INT ix;
double v;
CBLAS_INT i;
double v;
Comment thread
Om-A-osc marked this conversation as resolved.
Outdated

if ( N <= 0 ) {
return 0;
Expand Down