Skip to content

Commit 3503cae

Browse files
committed
docs: add note
1 parent 1c809a5 commit 3503cae

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/node_modules/@stdlib/array/put/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ var out = put( x, [ -10, 10 ], [ 20, 40 ], {
102102
## Notes
103103

104104
- The function mutates the input array `x`.
105+
- Because each index is only validated at the time of replacing a particular element, mutation may occur even when one or more indices are out-of-bounds, including when the index [mode][@stdlib/ndarray/base/ind] indicates to raise an exception.
105106
- The `values` array must have a [data type][@stdlib/array/dtypes] which can be [safely cast][@stdlib/array/safe-casts] to the input array data type. Floating-point data types (both real and complex) are allowed to downcast to a lower precision data type of the [same kind][@stdlib/array/same-kind-casts] (e.g., element values from a `'float64'` values array can be assigned to corresponding elements in a `'float32'` input array).
106107

107108
</section>

lib/node_modules/@stdlib/array/put/docs/repl.txt

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
The function mutates the input array.
99

10+
Because each index is only validated at the time of replacing a particular
11+
element, mutation may occur even when one or more indices are out-of-bounds,
12+
including when the index mode indicates to raise an exception.
13+
1014
If `indices` is an empty array, the function returns the input array
1115
unchanged.
1216

0 commit comments

Comments
 (0)