Scikit-learn
human-activity-recognition
wearable
wrist
time-series
cpu
scikit-learn
WISP / src /wisp_fast /funnel /native.py
Zipeng365's picture
wisp-har 0.4.0: WISP-Funnel search and the adaptive HMM switch (default decoder)
93a9282 verified
Raw History Blame Contribute Delete
448 Bytes
"""Look up optional CPU symbols in this engine's compiled extension (``_kernels``)."""
import ctypes
from importlib.util import find_spec
def lookup(symbol):
ext = find_spec(__package__ + "._kernels")
paths = [ext.origin] if ext is not None and ext.origin else []
for path in paths:
try:
return getattr(ctypes.CDLL(str(path)), symbol)
except (OSError, AttributeError):
continue
return None