Old engine for Continuous Time Bayesian Networks. Superseded by reCTBN. 🐍
https://github.com/madlabunimib/PyCTBN
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
297 B
13 lines
297 B
4 years ago
|
from functools import wraps
|
||
|
from time import time
|
||
|
|
||
|
def timing(f):
|
||
|
@wraps(f)
|
||
|
def wrap(*args, **kw):
|
||
|
ts = time()
|
||
|
result = f(*args, **kw)
|
||
|
te = time()
|
||
|
print (f"{f.__name__} args:[{args},{kw}] took: {te-ts} sec")
|
||
|
|
||
|
return result
|
||
|
return wrap
|