Skip to content

Commit 5acfd64

Browse files
committed
docs: fix example code
--- 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: 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 ---
1 parent 4f3789b commit 5acfd64

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

lib/node_modules/@stdlib/array/base/flatten2d-by/lib/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,8 @@
5858
* var x = [ [ 1, 2 ], [ 3, 4 ] ];
5959
*
6060
* var out = new Float64Array( 4 );
61-
* var y = flatten2dBy( x, [ 2, 2 ], true, out, 1, 0, scale );
61+
* var y = flatten2dBy( x, [ 2, 2 ], true, scale, out, 1, 0 );
6262
* // returns <Float64Array>[ 2, 6, 4, 8 ]
63-
*
64-
* var bool = ( y === out );
65-
* // returns true
6663
*/
6764

6865
// MODULES //

lib/node_modules/@stdlib/array/from-scalar/lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
* @module @stdlib/array/from-scalar
2525
*
2626
* @example
27-
* var array2scalar = require( '@stdlib/array/from-scalar' );
27+
* var scalar2array = require( '@stdlib/array/from-scalar' );
2828
*
2929
* var x = scalar2array( 1.0 );
3030
* // returns <Float64Array>[ 1.0 ]
3131
*
3232
* @example
33-
* var array2scalar = require( '@stdlib/array/from-scalar' );
33+
* var scalar2array = require( '@stdlib/array/from-scalar' );
3434
*
3535
* var x = scalar2array( 1.0, 'float32' );
3636
* // returns <Float32Array>[ 1.0 ]

lib/node_modules/@stdlib/array/pool/lib/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,16 @@
3030
* var arr = typedarraypool( 5, 'float64' );
3131
* // returns <Float64Array>[ 0.0, 0.0, 0.0, 0.0, 0.0 ]
3232
*
33+
* @example
34+
* var typedarraypool = require( '@stdlib/array/pool' );
35+
*
36+
* // Allocate an array:
37+
* var arr = typedarraypool( 5, 'float64' );
38+
*
39+
* // Modify the array:
3340
* arr[ 0 ] = 3.14;
3441
* arr[ 1 ] = 3.14;
35-
*
42+
3643
* // ...
3744
*
3845
* // Free the allocated memory to be used in a future allocation:

lib/node_modules/@stdlib/blas/base/wasm/sscal/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
*
4444
* // Perform operation:
4545
* sscal.ndarray( x.length, 5.0, x, 1, 0 );
46-
* // y => <Float32Array>[ 5.0, 10.0, 15.0, 20.0, 25.0 ]
46+
* // x => <Float32Array>[ 5.0, 10.0, 15.0, 20.0, 25.0 ]
4747
*
4848
* @example
4949
* var Memory = require( '@stdlib/wasm/memory' );

lib/node_modules/@stdlib/complex/float32/base/scale/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*
3030
* var z = new Complex64( 5.0, 3.0 );
3131
*
32-
* var out = scale( scalar, z );
32+
* var out = scale( 5.0, z );
3333
* // returns <Complex64>[ 25.0, 15.0 ]
3434
*/
3535

lib/node_modules/@stdlib/slice/base/slice2seq/lib/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* @module @stdlib/slice/base/slice2seq
2525
*
2626
* @example
27+
* var Slice = require( '@stdlib/slice/ctor' );
2728
* var slice2seq = require( '@stdlib/slice/base/slice2seq' );
2829
*
2930
* var str = slice2seq( new Slice( 2, 10, 2 ) );

0 commit comments

Comments
 (0)