Skip to content

Commit 7836149

Browse files
committed
docs: add note and update copy
--- 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 ---
1 parent 65748be commit 7836149

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

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

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ limitations under the License.
2020

2121
# fillBy
2222

23-
> Fill an input [`ndarray`][@stdlib/ndarray/ctor] according to a callback function.
23+
> Fill an input [ndarray][@stdlib/ndarray/ctor] according to a callback function.
2424
2525
<section class="intro">
2626

@@ -38,7 +38,7 @@ var fillBy = require( '@stdlib/ndarray/fill-by' );
3838

3939
#### fillBy( x, fcn\[, thisArg] )
4040

41-
Fills an input [`ndarray`][@stdlib/ndarray/ctor] according to a callback function.
41+
Fills an input [ndarray][@stdlib/ndarray/ctor] according to a callback function.
4242

4343
```javascript
4444
var zeros = require( '@stdlib/ndarray/zeros' );
@@ -64,7 +64,7 @@ var arr = ndarray2array( y );
6464

6565
The function accepts the following arguments:
6666

67-
- **x**: array-like object containing an input [`ndarray`][@stdlib/ndarray/ctor].
67+
- **x**: array-like object containing an input [ndarray][@stdlib/ndarray/ctor].
6868
- **fcn**: callback function.
6969
- **thisArg**: callback function execution context (_optional_).
7070

@@ -94,6 +94,12 @@ var arr = ndarray2array( y );
9494
// returns [ [ [ 10.0, 10.0 ] ], [ [ 10.0, 10.0 ] ], [ [ 10.0, 10.0 ] ] ]
9595
```
9696

97+
The callback function is provided the following arguments:
98+
99+
- **value**: current [ndarray][@stdlib/ndarray/ctor] element.
100+
- **indices**: current [ndarray][@stdlib/ndarray/ctor] element indices.
101+
- **arr**: the input [ndarray][@stdlib/ndarray/ctor].
102+
97103
</section>
98104

99105
<!-- /.usage -->
@@ -102,8 +108,9 @@ var arr = ndarray2array( y );
102108

103109
## Notes
104110

105-
- An input [`ndarray`][@stdlib/ndarray/ctor] **must** be writable. If provided a **read-only** [`ndarray`][@stdlib/ndarray/ctor], the function throws an error.
106-
- The function **mutates** the input [`ndarray`][@stdlib/ndarray/ctor].
111+
- An input [ndarray][@stdlib/ndarray/ctor] **must** be writable. If provided a **read-only** [ndarray][@stdlib/ndarray/ctor], the function throws an error.
112+
- The function **mutates** the input [ndarray][@stdlib/ndarray/ctor].
113+
- The function assumes that each element in the underlying input [ndarray][@stdlib/ndarray/ctor] data buffer has one, and only one, corresponding element in input [ndarray][@stdlib/ndarray/ctor] view (i.e., a provided [ndarray][@stdlib/ndarray/ctor] is not a broadcasted [ndarray][@stdlib/ndarray/ctor] view).
107114

108115
</section>
109116

lib/node_modules/@stdlib/ndarray/fill-by/docs/repl.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44

55
The function *mutates* the input ndarray.
66

7+
The function assumes that each element in the underlying input ndarray data
8+
buffer has one, and only one, corresponding element in input ndarray view
9+
(i.e., a provided ndarray is not a broadcasted ndarray view).
10+
11+
The callback function is provided the following arguments:
12+
13+
- value: current array element.
14+
- indices: current array element indices.
15+
- arr: the input ndarray.
16+
717
Parameters
818
----------
919
x: ndarrayLike

0 commit comments

Comments
 (0)