Skip to content

Commit c99d7ea

Browse files
committed
docs: add notes concerning handling of read-only output arrays
1 parent 8fabec9 commit c99d7ea

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/node_modules/@stdlib/ndarray/slice-assign/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ var arr = ndarray2array( y );
194194

195195
## Notes
196196

197+
- An output [`ndarray`][@stdlib/ndarray/ctor] **must** be writable. If provided a **read-only** [`ndarray`][@stdlib/ndarray/ctor], the function throws an error.
197198
- A **slice argument** must be either a [`Slice`][@stdlib/slice/ctor], an integer, `null`, or `undefined`.
198199
- The number of slice dimensions must match the number of output array dimensions. Hence, if `y` is a zero-dimensional [`ndarray`][@stdlib/ndarray/ctor], then, if `s` is a [`MultiSlice`][@stdlib/slice/multi], `s` should be empty, and, if `s` is an array, `s` should not contain any slice arguments. Similarly, if `y` is a one-dimensional [`ndarray`][@stdlib/ndarray/ctor], then, if `s` is a [`MultiSlice`][@stdlib/slice/multi], `s` should have one slice dimension, and, if `s` is an array, `s` should contain a single slice argument. And so on and so forth.
199200
- The input [`ndarray`][@stdlib/ndarray/ctor] **must** be [broadcast compatible][@stdlib/ndarray/base/broadcast-shapes] with the output [`ndarray`][@stdlib/ndarray/ctor] view.

lib/node_modules/@stdlib/ndarray/slice-assign/docs/repl.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
assigned to corresponding elements in a 'float32' output array).
3535

3636
y: ndarray
37-
Output array.
37+
Output array. The output array must be writable.
3838

3939
s: ...MultiSlice|Slice|null|undefined|integer|ArrayLike
4040
Slice arguments.

0 commit comments

Comments
 (0)