Skip to content

Commit e327a29

Browse files
author
Utsav Bhardwaj
committed
docs(ndarray/fill-by): update doctest output annotations
Update output annotations in usage examples to use <ndarray> notation and remove unnecessary array conversions via @stdlib/ndarray/to-array. Progresses stdlib-js#9329 --- 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_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - 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 7993e08 commit e327a29

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

  • lib/node_modules/@stdlib/ndarray/fill-by

‎lib/node_modules/@stdlib/ndarray/fill-by/README.md‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ Fills an input [ndarray][@stdlib/ndarray/ctor] according to a callback function.
4242

4343
```javascript
4444
var zeros = require( '@stdlib/ndarray/zeros' );
45-
var ndarray2array = require( '@stdlib/ndarray/to-array' );
4645

4746
function fcn( value ) {
4847
return value + 10.0;
@@ -53,13 +52,10 @@ var x = zeros( [ 3, 1, 2 ], {
5352
});
5453

5554
var y = fillBy( x, fcn );
56-
// returns <ndarray>
55+
// returns <ndarray>[ [ [ 10.0, 10.0 ] ], [ [ 10.0, 10.0 ] ], [ [ 10.0, 10.0 ] ] ]
5756

5857
var bool = ( y === x );
5958
// returns true
60-
61-
var arr = ndarray2array( y );
62-
// returns [ [ [ 10.0, 10.0 ] ], [ [ 10.0, 10.0 ] ], [ [ 10.0, 10.0 ] ] ]
6359
```
6460

6561
The function accepts the following arguments:
@@ -74,7 +70,6 @@ To set the callback function execution context, provide a `thisArg`.
7470

7571
```javascript
7672
var zeros = require( '@stdlib/ndarray/zeros' );
77-
var ndarray2array = require( '@stdlib/ndarray/to-array' );
7873

7974
function fcn( value ) {
8075
return value + this.factor;
@@ -88,10 +83,7 @@ var ctx = {
8883
'factor': 10.0
8984
};
9085
var y = fillBy( x, fcn, ctx );
91-
// returns <ndarray>
92-
93-
var arr = ndarray2array( y );
94-
// returns [ [ [ 10.0, 10.0 ] ], [ [ 10.0, 10.0 ] ], [ [ 10.0, 10.0 ] ] ]
86+
// returns <ndarray>[ [ [ 10.0, 10.0 ] ], [ [ 10.0, 10.0 ] ], [ [ 10.0, 10.0 ] ] ]
9587
```
9688

9789
The callback function is provided the following arguments:

0 commit comments

Comments
 (0)