Skip to content

Commit c5d639b

Browse files
committed
docs: update examples
--- 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: 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent e190e87 commit c5d639b

File tree

1 file changed

+10
-10
lines changed
  • lib/node_modules/@stdlib/blas/ext/base/czero-to

1 file changed

+10
-10
lines changed

lib/node_modules/@stdlib/blas/ext/base/czero-to/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ The `N` and stride parameters determine which elements in the strided array are
5656
```javascript
5757
var Complex64Array = require( '@stdlib/array/complex64' );
5858

59-
var x = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
59+
var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
6060

61-
czeroTo( 2, x, 2 );
62-
// x => <Complex64Array>[ 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0 ]
61+
czeroTo( 3, x, 2 );
62+
// x => <Complex64Array>[ 0.0, 0.0, 3.0, 4.0, 1.0, 0.0, 7.0, 8.0, 2.0, 0.0, 11.0, 12.0 ]
6363
```
6464

6565
Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
@@ -70,14 +70,14 @@ Note that indexing is relative to the first index. To introduce an offset, use [
7070
var Complex64Array = require( '@stdlib/array/complex64' );
7171

7272
// Initial array...
73-
var x0 = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
73+
var x0 = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
7474

7575
// Create an offset view...
7676
var x1 = new Complex64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
7777

7878
// Fill every other element...
79-
czeroTo( 2, x1, 1 );
80-
// x0 => <Complex64Array>[ 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0 ]
79+
czeroTo( 3, x1, 2 );
80+
// x0 => <Complex64Array>[ 1.0, 2.0, 0.0, 0.0, 5.0, 6.0, 1.0, 0.0, 9.0, 10.0, 2.0, 0.0 ]
8181
```
8282

8383
#### czeroTo.ndarray( N, x, strideX, offsetX )
@@ -97,17 +97,17 @@ The function has the following additional parameters:
9797

9898
- **offsetX**: starting index.
9999

100-
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 access only the last two elements:
100+
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 access only the last three elements:
101101

102102
<!-- eslint-disable max-len -->
103103

104104
```javascript
105105
var Complex64Array = require( '@stdlib/array/complex64' );
106106

107-
var x = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
107+
var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
108108

109-
czeroTo.ndarray( 2, x, 1, x.length-2 );
110-
// x => <Complex64Array>[ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 ]
109+
czeroTo.ndarray( 3, x, 1, x.length-3 );
110+
// x => <Complex64Array>[ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 0.0, 0.0, 1.0, 0.0, 2.0, 0.0 ]
111111
```
112112

113113
</section>

0 commit comments

Comments
 (0)