Skip to content

Commit c188028

Browse files
committed
docs: fix descriptions
--- 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: na - 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 34f1b73 commit c188028

File tree

1 file changed

+61
-61
lines changed
  • lib/node_modules/@stdlib/blas/ext/index-of/docs

1 file changed

+61
-61
lines changed
Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
11

22
{{alias}}( x, searchElement[, fromIndex][, options] )
3-
Returns the first index of a specified search element along one or more
4-
ndarray dimensions.
3+
Returns the first index of a specified search element along an ndarray
4+
dimension.
5+
6+
When searching for a search element, the function checks for equality using
7+
the strict equality operator `===`. As a consequence, `NaN` values are
8+
considered distinct, and `-0` and `+0` are considered the same.
9+
10+
If unable to find a search element along an ndarray dimension, the
11+
corresponding element in the returned ndarray is `-1`.
512

613
Parameters
714
----------
815
x: ndarray
9-
Input array.
10-
11-
searchElement: ndarray|*
12-
Element in an input ndarray for which to find an index. May be either a
13-
scalar value or an ndarray having a data type same as the data type of
14-
the input ndarray. If provided a scalar value, the value is cast to the
15-
data type of the input ndarray. If provided an ndarray, the value must
16-
have a shape which is broadcast compatible with the complement of the
17-
shape defined by `options.dims`. For example, given the input shape
18-
`[2, 3, 4]` and `options.dims=[0]`, the search element ndarray must have
19-
a shape which is broadcast-compatible with the shape `[3, 4]`. Similarly
20-
when performing the operation over all elements in a provided input
21-
ndarray, a search element ndarray must be a zero-dimensional ndarray.
16+
Input array. Must have at least one dimension.
17+
18+
searchElement: ndarray|any
19+
Search element. May be either a scalar value or an ndarray. If provided
20+
a scalar value, the value is cast to the data type of the input ndarray.
21+
If provided an ndarray, the value must have a shape which is broadcast
22+
compatible with the non-reduced dimensions of the input ndarray. For
23+
example, given the input shape `[2, 3, 4]` and `options.dim=0`, the
24+
search element ndarray must have a shape which is broadcast-compatible
25+
with the shape `[3, 4]`.
2226

2327
fromIndex: ndarray|integer (optional)
2428
Index from which to begin searching. May be either a scalar value or an
25-
ndarray having an `integer` or `generic` data type. If provided an
26-
ndarray the value must have a shape which is broadcast compatible with
27-
the complement of the shape defined by `options.dims`. For example,
28-
given the input shape `[2, 3, 4]` and `options.dims=[0]`, an ndarray
29-
containing the index from which to begin searching must have a shape
30-
which is broadcast-compatible with the shape `[3, 4]`. Similarly
31-
when performing the operation over all elements in a provided input
32-
ndarray, an ndarray containing the index from which to begin searching
33-
must be a zero-dimensional ndarray. By default, the index
34-
from which to begin searching is `0`.
29+
ndarray having an integer or "generic" data type. If provided an ndarray
30+
the value must have a shape which is broadcast compatible with the non-
31+
reduced dimensions of the input ndarray. For example, given the input
32+
shape `[2, 3, 4]` and `options.dim=0`, a provided ndarray must have a
33+
shape which is broadcast-compatible with the shape `[3, 4]`. Default: 0.
3534

3635
options: Object (optional)
3736
Function options.
3837

3938
options.dtype: string (optional)
40-
Output array data type. Must be an integer or generic data type.
39+
Output array data type. Must be an integer or "generic" data type.
4140

42-
options.dims: Array<integer> (optional)
43-
List of dimensions over which to perform a reduction. If not provided,
44-
the function performs a reduction over all elements in a provided input
45-
ndarray.
41+
options.dim: integer (optional)
42+
Dimension over which to perform a reduction. If provided a negative
43+
integer, the dimension along which to perform the operation is
44+
determined by counting backward from the last dimension (where -1 refers
45+
to the last dimension). Default: -1.
4646

4747
options.keepdims: boolean (optional)
4848
Boolean indicating whether the reduced dimensions should be included in
@@ -58,53 +58,53 @@
5858
> var x = {{alias:@stdlib/ndarray/array}}( [ -1.0, 2.0, -3.0, -4.0 ] );
5959
> var y = {{alias}}( x, 2.0 );
6060
> var v = y.get()
61-
1.0
61+
1
6262

6363

6464
{{alias}}.assign( x, searchElement[, fromIndex], out[, options] )
65-
Returns the first index of a specified search element along one or more
66-
ndarray dimensions and assigns results to a provided output ndarray.
65+
Returns the first index of a specified search element along an ndarray
66+
dimension and assigns results to a provided output ndarray.
67+
68+
When searching for a search element, the function checks for equality using
69+
the strict equality operator `===`. As a consequence, `NaN` values are
70+
considered distinct, and `-0` and `+0` are considered the same.
71+
72+
If unable to find a search element along an ndarray dimension, the
73+
corresponding element in the returned ndarray is `-1`.
6774

6875
Parameters
6976
----------
7077
x: ndarray
71-
Input array.
72-
73-
searchElement: ndarray|*
74-
Element in an input ndarray for which to find an index. May be either a
75-
scalar value or an ndarray having a data type same as the data type of
76-
the input ndarray. If provided a scalar value, the value is cast to the
77-
data type of the input ndarray. If provided an ndarray, the value must
78-
have a shape which is broadcast compatible with the complement of the
79-
shape defined by `options.dims`. For example, given the input shape
80-
`[2, 3, 4]` and `options.dims=[0]`, the search element ndarray must have
81-
a shape which is broadcast-compatible with the shape `[3, 4]`. Similarly
82-
when performing the operation over all elements in a provided input
83-
ndarray, a search element ndarray must be a zero-dimensional ndarray.
78+
Input array. Must have at least one dimension.
79+
80+
searchElement: ndarray|any
81+
Search element. May be either a scalar value or an ndarray. If provided
82+
a scalar value, the value is cast to the data type of the input ndarray.
83+
If provided an ndarray, the value must have a shape which is broadcast
84+
compatible with the non-reduced dimensions of the input ndarray. For
85+
example, given the input shape `[2, 3, 4]` and `options.dim=0`, the
86+
search element ndarray must have a shape which is broadcast-compatible
87+
with the shape `[3, 4]`.
8488

8589
fromIndex: ndarray|integer (optional)
8690
Index from which to begin searching. May be either a scalar value or an
87-
ndarray having an `integer` or `generic` data type. If provided an
88-
ndarray the value must have a shape which is broadcast compatible with
89-
the complement of the shape defined by `options.dims`. For example,
90-
given the input shape `[2, 3, 4]` and `options.dims=[0]`, an ndarray
91-
containing the index from which to begin searching must have a shape
92-
which is broadcast-compatible with the shape `[3, 4]`. Similarly
93-
when performing the operation over all elements in a provided input
94-
ndarray, an ndarray containing the index from which to begin searching
95-
must be a zero-dimensional ndarray. By default, the value of the index
96-
from which to begin searching is `0`.
91+
ndarray having an integer or "generic" data type. If provided an ndarray
92+
the value must have a shape which is broadcast compatible with the non-
93+
reduced dimensions of the input ndarray. For example, given the input
94+
shape `[2, 3, 4]` and `options.dim=0`, a provided ndarray must have a
95+
shape which is broadcast-compatible with the shape `[3, 4]`. Default: 0.
9796

9897
out: ndarray
9998
Output array.
10099

101100
options: Object (optional)
102101
Function options.
103102

104-
options.dims: Array<integer> (optional)
105-
List of dimensions over which to perform a reduction. If not provided,
106-
the function performs a reduction over all elements in a provided input
107-
ndarray.
103+
options.dim: integer (optional)
104+
Dimension over which to perform a reduction. If provided a negative
105+
integer, the dimension along which to perform the operation is
106+
determined by counting backward from the last dimension (where -1 refers
107+
to the last dimension). Default: -1.
108108

109109
Returns
110110
-------
@@ -120,7 +120,7 @@
120120
> var bool = ( out === y )
121121
true
122122
> var v = out.get()
123-
1.0
123+
1
124124

125125
See Also
126126
--------

0 commit comments

Comments
 (0)