Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Durairaj, Janani
caretta
Commits
10a456c0
Commit
10a456c0
authored
Jan 31, 2020
by
Akdel
Browse files
debug (removed njit)
parent
0ab924b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
caretta/dynamic_time_warping.py
View file @
10a456c0
...
...
@@ -4,7 +4,7 @@ import numpy as np
MINV
=
np
.
finfo
(
np
.
float64
).
min
@
nb
.
njit
#
@nb.njit
# @numba_cc.export('_make_dtw_matrix', 'f64[:](f64[:], f64, f64)')
def
_make_dtw_matrix
(
distance_matrix
:
np
.
ndarray
,
gap_open_penalty
:
float
=
0.
,
...
...
@@ -71,7 +71,7 @@ def _make_dtw_matrix(distance_matrix: np.ndarray,
return
matrix
,
backtrack
@
nb
.
njit
#
@nb.njit
# @numba_cc.export('_get_dtw_alignment', '(i64, i64[:], i64, i64)')
def
_get_dtw_alignment
(
start_direction
,
backtrack
:
np
.
ndarray
,
n1
,
m1
):
"""
...
...
@@ -131,7 +131,7 @@ def _get_dtw_alignment(start_direction, backtrack: np.ndarray, n1, m1):
return
indices_1
[:
index
][::
-
1
],
indices_2
[:
index
][::
-
1
]
@
nb
.
njit
#
@nb.njit
# @numba_cc.export('dtw_align', '(f64[:], f64, f64)')
def
dtw_align
(
distance_matrix
:
np
.
ndarray
,
gap_open_penalty
:
float
=
0.
,
gap_extend_penalty
:
float
=
0.
):
"""
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment