Skip to content

Commit 58636c1

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: 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: 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: na ---
1 parent 5543da8 commit 58636c1

File tree

1 file changed

+19
-7
lines changed
  • lib/node_modules/@stdlib/lapack/base/zlacpy

1 file changed

+19
-7
lines changed

lib/node_modules/@stdlib/lapack/base/zlacpy/README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,15 @@ Copies all or part of a matrix `A` to another matrix `B`.
3636

3737
```javascript
3838
var Complex128Array = require( '@stdlib/array/complex128' );
39+
var reinterpret = require( '@stdlib/strided/base/reinterpret-complex128' );
3940

4041
var A = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
4142
var B = new Complex128Array( 4 );
4243

4344
zlacpy( 'row-major', 'all', 2, 2, A, 2, B, 2 );
44-
// B => <Complex128Array>
45+
46+
var viewB = reinterpret( B, 0 );
47+
// returns <Float64Array>[ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ]
4548
```
4649

4750
The function has the following parameters:
@@ -61,6 +64,7 @@ Note that indexing is relative to the first index. To introduce an offset, use [
6164

6265
```javascript
6366
var Complex128Array = require( '@stdlib/array/complex128' );
67+
var reinterpret = require( '@stdlib/strided/base/reinterpret-complex128' );
6468

6569
// Initial arrays...
6670
var A0 = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0 ] );
@@ -71,7 +75,9 @@ var A1 = new Complex128Array( A0.buffer, A0.BYTES_PER_ELEMENT*1 ); // start at 2
7175
var B1 = new Complex128Array( B0.buffer, B0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
7276

7377
zlacpy( 'row-major', 'all', 2, 2, A1, 2, B1, 2 );
74-
// B0 => <Complex128Array>
78+
79+
var viewB = reinterpret( B0, 0 );
80+
// returns <Float64Array>[ 0.0, 0.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0 ]
7581
```
7682

7783
#### zlacpy.ndarray( uplo, M, N, A, sa1, sa2, oa, B, sb1, sb2, ob )
@@ -80,12 +86,15 @@ Copies all or part of a matrix `A` to another matrix `B` using alternative index
8086

8187
```javascript
8288
var Complex128Array = require( '@stdlib/array/complex128' );
89+
var reinterpret = require( '@stdlib/strided/base/reinterpret-complex128' );
8390

8491
var A = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
85-
var B = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
92+
var B = new Complex128Array( 4 );
8693

8794
zlacpy.ndarray( 'all', 2, 2, A, 2, 1, 0, B, 2, 1, 0 );
88-
// B => <Complex128Array>
95+
96+
var viewB = reinterpret( B, 0 );
97+
// returns <Float64Array>[ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ]
8998
```
9099

91100
The function has the following parameters:
@@ -108,12 +117,15 @@ While [`typed array`][mdn-typed-array] views mandate a view offset based on the
108117

109118
```javascript
110119
var Complex128Array = require( '@stdlib/array/complex128' );
120+
var reinterpret = require( '@stdlib/strided/base/reinterpret-complex128' );
111121

112-
var A = new Complex128Array( [ 0.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
113-
var B = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 11.0, 312.0, 53.0, 412.0, 24.0, 58.0, 85.0, 74.0 ] );
122+
var A = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0 ] );
123+
var B = new Complex128Array( 6 );
114124

115125
zlacpy.ndarray( 'all', 2, 2, A, 2, 1, 1, B, 2, 1, 2 );
116-
// B => <Complex128Array>
126+
127+
var viewB = reinterpret( B, 0 );
128+
// returns <Float64Array>[ 0.0, 0.0, 0.0, 0.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0 ]
117129
```
118130

119131
</section>

0 commit comments

Comments
 (0)