You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/blas/ext/index-of/README.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -53,12 +53,12 @@ The function has the following parameters:
53
53
54
54
-**x**: input [ndarray][@stdlib/ndarray/ctor].
55
55
- **searchElement**: element in an input [ndarray][@stdlib/ndarray/ctor] for which to find an index. May be either a scalar value or an [ndarray][@stdlib/ndarray/ctor] having a [data type][@stdlib/ndarray/dtypes] same as the data type of the input [ndarray][@stdlib/ndarray/ctor]. If provided a scalar value, the value is cast to the data type of the input [ndarray][@stdlib/ndarray/ctor]. If provided an [ndarray][@stdlib/ndarray/ctor], the value must have a shape which is [broadcast-compatible][@stdlib/ndarray/base/broadcast-shapes] with the complement of the shape defined by `options.dims`. For example, given the input shape `[2, 3, 4]` and `options.dims=[0]`, the search element [ndarray][@stdlib/ndarray/ctor] must have a shape which is [broadcast-compatible][@stdlib/ndarray/base/broadcast-shapes] with the shape `[3, 4]`. Similarly, when performing the operation over all elements in a provided input [ndarray][@stdlib/ndarray/ctor], the search element [ndarray][@stdlib/ndarray/ctor] must be a zero-dimensional [ndarray][@stdlib/ndarray/ctor].
56
-
-**fromIndex**: index from which to begin searching (_optional_). May be either a scalar value or an [ndarray][@stdlib/ndarray/ctor] having a numeric or `generic`[data type][@stdlib/ndarray/dtypes]. If provided an [ndarray][@stdlib/ndarray/ctor], the value must have a shape which is [broadcast-compatible][@stdlib/ndarray/base/broadcast-shapes] with the complement of the shape defined by `options.dims`. For example, given the input shape `[2, 3, 4]` and `options.dims=[0]`, an [ndarray][@stdlib/ndarray/ctor] containing the index from which to begin searching must have a shape which is [broadcast-compatible][@stdlib/ndarray/base/broadcast-shapes] with the shape `[3, 4]`. Similarly, when performing the operation over all elements in a provided input [ndarray][@stdlib/ndarray/ctor], an [ndarray][@stdlib/ndarray/ctor] containing the index from which to begin searching must be a zero-dimensional [ndarray][@stdlib/ndarray/ctor]. By default, the the index from which to begin searching is `0`.
56
+
-**fromIndex**: index from which to begin searching (_optional_). May be either a scalar value or an [ndarray][@stdlib/ndarray/ctor] having an `integer` or `generic`[data type][@stdlib/ndarray/dtypes]. If provided an [ndarray][@stdlib/ndarray/ctor], the value must have a shape which is [broadcast-compatible][@stdlib/ndarray/base/broadcast-shapes] with the complement of the shape defined by `options.dims`. For example, given the input shape `[2, 3, 4]` and `options.dims=[0]`, an [ndarray][@stdlib/ndarray/ctor] containing the index from which to begin searching must have a shape which is [broadcast-compatible][@stdlib/ndarray/base/broadcast-shapes] with the shape `[3, 4]`. Similarly, when performing the operation over all elements in a provided input [ndarray][@stdlib/ndarray/ctor], an [ndarray][@stdlib/ndarray/ctor] containing the index from which to begin searching must be a zero-dimensional [ndarray][@stdlib/ndarray/ctor]. By default, the the index from which to begin searching is `0`.
57
57
-**options**: function options (_optional_).
58
58
59
59
The function accepts the following options:
60
60
61
-
-**dtype**: output ndarray [data type][@stdlib/ndarray/dtypes]. Must be a "integer_index" [data type][@stdlib/ndarray/dtypes].
61
+
-**dtype**: output ndarray [data type][@stdlib/ndarray/dtypes]. Must be an "integer_index_and_generic" [data type][@stdlib/ndarray/dtypes].
62
62
-**dims**: list of dimensions over which to perform operation. If not provided, the function performs the operation over all elements in a provided input [ndarray][@stdlib/ndarray/ctor].
63
63
-**keepdims**: boolean indicating whether the reduced dimensions should be included in the returned [ndarray][@stdlib/ndarray/ctor] as singleton dimensions. Default: `false`.
64
64
@@ -181,8 +181,8 @@ The method has the following parameters:
181
181
182
182
-**x**: input [ndarray][@stdlib/ndarray/ctor].
183
183
- **searchElement**: element in an input [ndarray][@stdlib/ndarray/ctor] for which to find an index. May be either a scalar value or an [ndarray][@stdlib/ndarray/ctor] having a [data type][@stdlib/ndarray/dtypes] same as the data type of the input [ndarray][@stdlib/ndarray/ctor]. If provided a scalar value, the value is cast to the data type of the input [ndarray][@stdlib/ndarray/ctor]. If provided an [ndarray][@stdlib/ndarray/ctor], the value must have a shape which is [broadcast-compatible][@stdlib/ndarray/base/broadcast-shapes] with the complement of the shape defined by `options.dims`. For example, given the input shape `[2, 3, 4]` and `options.dims=[0]`, the search element [ndarray][@stdlib/ndarray/ctor] must have a shape which is [broadcast-compatible][@stdlib/ndarray/base/broadcast-shapes] with the shape `[3, 4]`. Similarly, when performing the operation over all elements in a provided input [ndarray][@stdlib/ndarray/ctor], an [ndarray][@stdlib/ndarray/ctor] initial value must be a zero-dimensional [ndarray][@stdlib/ndarray/ctor].
184
-
-**fromIndex**: index from which to begin searching (_optional_). May be either a scalar value or an [ndarray][@stdlib/ndarray/ctor] having a numeric or `generic`[data type][@stdlib/ndarray/dtypes]. If provided an [ndarray][@stdlib/ndarray/ctor], the value must have a shape which is [broadcast-compatible][@stdlib/ndarray/base/broadcast-shapes] with the complement of the shape defined by `options.dims`. For example, given the input shape `[2, 3, 4]` and `options.dims=[0]`, an [ndarray][@stdlib/ndarray/ctor] containing the index from which to begin searching must have a shape which is [broadcast-compatible][@stdlib/ndarray/base/broadcast-shapes] with the shape `[3, 4]`. Similarly, when performing the operation over all elements in a provided input [ndarray][@stdlib/ndarray/ctor], an [ndarray][@stdlib/ndarray/ctor] containing the index from which to begin searching must be a zero-dimensional [ndarray][@stdlib/ndarray/ctor]. By default, the the index from which to begin searching is `0`.
185
-
-**out**: output [ndarray][@stdlib/ndarray/ctor]. Must have a numeric or generic [data type][@stdlib/ndarray/dtypes].
184
+
-**fromIndex**: index from which to begin searching (_optional_). May be either a scalar value or an [ndarray][@stdlib/ndarray/ctor] having an `integer` or `generic`[data type][@stdlib/ndarray/dtypes]. If provided an [ndarray][@stdlib/ndarray/ctor], the value must have a shape which is [broadcast-compatible][@stdlib/ndarray/base/broadcast-shapes] with the complement of the shape defined by `options.dims`. For example, given the input shape `[2, 3, 4]` and `options.dims=[0]`, an [ndarray][@stdlib/ndarray/ctor] containing the index from which to begin searching must have a shape which is [broadcast-compatible][@stdlib/ndarray/base/broadcast-shapes] with the shape `[3, 4]`. Similarly, when performing the operation over all elements in a provided input [ndarray][@stdlib/ndarray/ctor], an [ndarray][@stdlib/ndarray/ctor] containing the index from which to begin searching must be a zero-dimensional [ndarray][@stdlib/ndarray/ctor]. By default, the the index from which to begin searching is `0`.
185
+
-**out**: output [ndarray][@stdlib/ndarray/ctor]. Must have an `integer` or `generic`[data type][@stdlib/ndarray/dtypes].
@@ -47,16 +48,17 @@ var DEFAULT_DTYPE = defaults.get( 'dtypes.integer_index' );
47
48
* @name assign
48
49
* @type {Function}
49
50
* @param {ndarrayLike} x - input ndarray
50
-
* @param {(ndarrayLike|number)} searchElement - search element
51
-
* @param {(ndarrayLike|number)} [fromIndex] - index from which to begin searching
51
+
* @param {(ndarrayLike|*)} searchElement - search element
52
+
* @param {(ndarrayLike|integer)} [fromIndex] - index from which to begin searching
52
53
* @param {ndarrayLike} out - output ndarray
53
54
* @param {Options} [options] - function options
54
55
* @param {IntegerArray} [options.dims] - list of dimensions over which to perform operation
55
56
* @param {boolean} [options.keepdims=false] - boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions
56
57
* @param {string} [options.dtype] - output ndarray data type
58
+
* @throws {TypeError} function must be provided at least two arguments
57
59
* @throws {TypeError} first argument must be an ndarray-like object
58
-
* @throws {TypeError} search element argument must be either an ndarray-like object or a numeric value
59
-
* @throws {TypeError} from index argument must be either an ndarray-like object or a numeric value
60
+
* @throws {TypeError} third argument must be either an ndarray-like object or an integer
61
+
* @throws {TypeError} fourth argument must be an ndarray-like object
60
62
* @throws {TypeError} options argument must be an object
61
63
* @throws {RangeError} dimension indices must not exceed input ndarray bounds
62
64
* @throws {RangeError} number of dimension indices must not exceed the number of input ndarray dimensions
@@ -66,7 +68,6 @@ var DEFAULT_DTYPE = defaults.get( 'dtypes.integer_index' );
66
68
* @example
67
69
* var Float64Array = require( '@stdlib/array/float64' );
68
70
* var zeros = require( '@stdlib/ndarray/zeros' );
69
-
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
70
71
* var ndarray = require( '@stdlib/ndarray/ctor' );
// When not provided `dims`, the operation is performed across all dimensions and `v` is assumed to be a zero-dimensional ndarray; when `dims` is provided, we need to broadcast `v` to match the shape of the non-core dimensions...
// When not provided `dims`, the operation is performed across all dimensions and `v` is assumed to be a zero-dimensional ndarray; when `dims` is provided, we need to broadcast `v` to match the shape of the non-core dimensions...
// When not provided `dims`, the operation is performed across all dimensions and `v` is assumed to be a zero-dimensional ndarray; when `dims` is provided, we need to broadcast `v` to match the shape of the non-core dimensions...
thrownewTypeError(format('invalid argument. Second and third arguments must be either an ndarray or a scalar value. Value: `%s`.',searchElement,fromIndex));
164
+
thrownewTypeError(format('invalid argument. Third argument must be either an ndarray or an integer. Value: `%s`.',fromIndex));
0 commit comments