Skip to content

Commit 5f69d46

Browse files
chore: added NaN value in array
--- 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: na - 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: 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: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: passed - 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: na ---
1 parent 97fab3a commit 5f69d46

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

lib/node_modules/@stdlib/stats/base/dnanvarianceyc/README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,26 +120,28 @@ The function has the following parameters:
120120

121121
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to compute the [variance][variance] of every other element in `x`,
122122

123+
<!-- eslint-disable max-len -->
124+
123125
```javascript
124126
var Float64Array = require( '@stdlib/array/float64' );
125127

126-
var x = new Float64Array( [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0, NaN ] );
128+
var x = new Float64Array( [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0, NaN, NaN ] );
127129

128-
var v = dnanvarianceyc( 4, 1, x, 2 );
130+
var v = dnanvarianceyc( 5, 1, x, 2 );
129131
// returns 6.25
130132
```
131133

132134
Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
133135

134-
<!-- eslint-disable stdlib/capitalized-comments -->
136+
<!-- eslint-disable stdlib/capitalized-comments, max-len -->
135137

136138
```javascript
137139
var Float64Array = require( '@stdlib/array/float64' );
138140

139-
var x0 = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN ] );
141+
var x0 = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );
140142
var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
141143

142-
var v = dnanvarianceyc( 4, 1, x1, 2 );
144+
var v = dnanvarianceyc( 5, 1, x1, 2 );
143145
// returns 6.25
144146
```
145147

@@ -162,12 +164,14 @@ The function has the following additional parameters:
162164

163165
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to calculate the [variance][variance] for every other element in `x` starting from the second element
164166

167+
<!-- eslint-disable max-len -->
168+
165169
```javascript
166170
var Float64Array = require( '@stdlib/array/float64' );
167171

168-
var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
172+
var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN] );
169173

170-
var v = dnanvarianceyc.ndarray( 4, 1, x, 2, 1 );
174+
var v = dnanvarianceyc.ndarray( 5, 1, x, 2, 1 );
171175
// returns 6.25
172176
```
173177

lib/node_modules/@stdlib/stats/base/dnanvarianceyc/docs/repl.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@
5151
~4.3333
5252

5353
// Using `N` and stride parameters:
54-
> x = new {{alias:@stdlib/array/float64}}( [ -2.0, 1.0, 1.0, -5.0, 2.0, -1.0 ] );
55-
> {{alias}}( 3, 1, x, 2 )
54+
> x = new {{alias:@stdlib/array/float64}}( [ -2.0, 1.0, 1.0, -5.0, 2.0, -1.0, NaN, NaN ] );
55+
> {{alias}}( 4, 1, x, 2 )
5656
~4.3333
5757

5858
// Using view offsets:
59-
> var x0 = new {{alias:@stdlib/array/float64}}( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0 ] );
59+
> var x0 = new {{alias:@stdlib/array/float64}}( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0, NaN, NaN ] );
6060
> var x1 = new {{alias:@stdlib/array/float64}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
61-
> {{alias}}( 3, 1, x1, 2 )
61+
> {{alias}}( 4, 1, x1, 2 )
6262
~4.3333
6363

6464

@@ -111,8 +111,8 @@
111111
~4.3333
112112

113113
// Using offset parameter:
114-
> var x = new {{alias:@stdlib/array/float64}}( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0 ] );
115-
> {{alias}}.ndarray( 3, 1, x, 2, 1 )
114+
> var x = new {{alias:@stdlib/array/float64}}( [ 1.0, -2.0, 3.0, 2.0, 5.0, -1.0, NaN, NaN ] );
115+
> {{alias}}.ndarray( 4, 1, x, 2, 1 )
116116
~4.3333
117117

118118
See Also

0 commit comments

Comments
 (0)