MCPcopy Create free account
hub / github.com/DynamicTimeWarping/dtw-python / T

Method T

dtw/stepPattern.py:286–296  ·  view source on GitHub ↗

Transpose a step pattern.

(self)

Source from the content-addressed store, hash-verified

284 return int(numpy.max(self.mx[:, 0]))
285
286 def T(self):
287 """Transpose a step pattern."""
288 tmx = self.mx.copy()
289 tmx = tmx[:, [0, 2, 1, 3]]
290 th = self.hint
291 if th == "N":
292 th = "M"
293 elif th == "M":
294 th = "N"
295 tsp = StepPattern(tmx, th)
296 return tsp
297
298 def __str__(self):
299 np = self.get_n_patterns()

Callers

nothing calls this directly

Calls 1

StepPatternClass · 0.85

Tested by

no test coverage detected