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
@@ -44,118 +43,151 @@ var DEFAULT_DTYPE = defaults.get( 'dtypes.integer_index' );
44
43
// MAIN //
45
44
46
45
/**
47
-
* Returns the first index of a specified search element along one or more ndarray dimensions.
46
+
* Returns the first index of a specified search element along an ndarray dimension.
48
47
*
49
48
* @name indexOf
50
49
* @type {Function}
51
50
* @param {ndarrayLike} x - input ndarray
52
51
* @param {(ndarrayLike|*)} searchElement - search element
53
52
* @param {(ndarrayLike|integer)} [fromIndex] - index from which to begin searching
54
53
* @param {Options} [options] - function options
55
-
* @param {IntegerArray} [options.dims] - list of dimensions over which to perform operation
54
+
* @param {IntegerArray} [options.dim=-1] - dimension over which to perform operation
56
55
* @param {boolean} [options.keepdims=false] - boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions
57
56
* @param {string} [options.dtype] - output ndarray data type
58
57
* @throws {TypeError} first argument must be an ndarray-like object
59
58
* @throws {TypeError} the function must be provided at least two arguments
60
59
* @throws {TypeError} third argument must be either an ndarray-like object or an integer
61
60
* @throws {TypeError} options argument must be an object
62
-
* @throws {RangeError} dimension indices must not exceed input ndarray bounds
63
-
* @throws {RangeError} number of dimension indices must not exceed the number of input ndarray dimensions
61
+
* @throws {RangeError} dimension index must not exceed input ndarray bounds
64
62
* @throws {Error} must provide valid options
65
63
* @returns {ndarray} output ndarray
66
64
*
67
65
* @example
68
66
* var Float64Array = require( '@stdlib/array/float64' );
67
+
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
69
68
* var ndarray = require( '@stdlib/ndarray/ctor' );
70
69
*
71
70
* // Create a data buffer:
72
71
* var xbuf = new Float64Array( [ 1.0, 2.0, -3.0, 4.0, -5.0, 6.0 ] );
73
72
*
74
73
* // Define the shape of the input array:
75
-
* var sh = [ 3, 1, 2 ];
74
+
* var sh = [ 2, 3 ];
76
75
*
77
76
* // Define the array strides:
78
-
* var sx = [ 2, 2, 1 ];
77
+
* var sx = [ 3, 1 ];
79
78
*
80
79
* // Define the index offset:
81
80
* var ox = 0;
82
81
*
83
82
* // Create an input ndarray:
84
83
* var x = new ndarray( 'float64', xbuf, sh, sx, ox, 'row-major' );
0 commit comments