Commit a4458b17 authored by Samuel GAIST's avatar Samuel GAIST

[test][prefix] Update loop following output update

parent 11d61328
......@@ -11,9 +11,6 @@
}
},
"outputs": {
"out": {
"type": "user/single_integer/1"
}
},
"loop": {
"request": {
......
......@@ -10,6 +10,11 @@
"type": "user/single_integer/1"
}
},
"outputs": {
"out": {
"type": "user/single_integer/1"
}
},
"loop": {
"request": {
"type": "user/1d_array_of_integers/1"
......
......@@ -41,6 +41,7 @@ class Algorithm:
def __init__(self):
self.threshold = None
self.max = 0
self.output = None
def setup(self, parameters):
self.threshold = parameters["threshold"]
......@@ -61,4 +62,8 @@ class Algorithm:
value = result.value[0]
result = value > self.threshold and value < self.max
delta = self.max - value
self.output = delta
return (result, {"value": np.float32(delta)})
def write(self, outputs):
outputs["out"].write({"value": np.int32(self.output)})
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment