Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MegEngine/MegFlow
/ restrict
Method
restrict
flow-python/examples/application/electric_bicycle/det.py:37–43 ·
view source on GitHub ↗
(val, min, max)
Source
from the content-addressed store, hash-verified
35
36
@staticmethod
37
def
restrict(val, min, max):
38
assert min < max
39
if
val < min:
40
val = min
41
if
val > max:
42
val = max
43
return
round(val)
44
45
def
exec(self):
46
envelope = self.inp.recv()
Callers
1
exec
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected