forked from Open-EO/openeo-processes
-
Notifications
You must be signed in to change notification settings - Fork 4
/
array_find_label.json
46 lines (46 loc) · 1.42 KB
/
array_find_label.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
"id": "array_find_label",
"summary": "Get the index for a label in a labeled array",
"description": "Checks whether the labeled array specified for `data` has the label specified in `label` and returns the zero-based index for it. If there's no match as either the label doesn't exist or the array is not labeled, `null` is returned.\n\nUse ``array_find()`` to find the index for a given value in the array.",
"categories": [
"arrays",
"reducer"
],
"experimental": true,
"parameters": [
{
"name": "data",
"description": "List to find the label in.",
"schema": {
"type": "array",
"items": {
"description": "Any data type is allowed."
}
}
},
{
"name": "label",
"description": "Label to find in `data`.",
"schema": [
{
"type": "number"
},
{
"type": "string"
}
]
}
],
"returns": {
"description": "The index of the element with the specified label assigned. If no such label was found, `null` is returned.",
"schema": [
{
"type": "null"
},
{
"type": "integer",
"minimum": 0
}
]
}
}