MCPcopy Index your code
hub / github.com/DynamicTimeWarping/dtw-python / _canonicalizeWindowFunction

Function _canonicalizeWindowFunction

dtw/dtw.py:490–502  ·  view source on GitHub ↗
(window_type)

Source from the content-addressed store, hash-verified

488
489# Return a callable object representing the window
490def _canonicalizeWindowFunction(window_type):
491 if callable(window_type):
492 return window_type
493
494 if window_type is None:
495 return noWindow
496
497 return {
498 "none": noWindow,
499 "sakoechiba": sakoeChibaWindow,
500 "itakura": itakuraWindow,
501 "slantedband": slantedBandWindow
502 }.get(window_type, lambda: _error("Window function undefined"))
503
504
505def _canonicalizeStepPattern(s):

Callers 1

dtwFunction · 0.85

Calls 2

getMethod · 0.80
_errorFunction · 0.70

Tested by

no test coverage detected