Skip to content

Commit

Permalink
fix test for numpy2
Browse files Browse the repository at this point in the history
  • Loading branch information
tonigi committed May 18, 2024
1 parent 3da8d48 commit 179e8e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions dtw/countPaths.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def countPaths(d, debug=False):
>>> ds = dtw( numpy.arange(3,10), numpy.arange(1,9),
... keep_internals=True, step_pattern=asymmetric);
>>> countPaths(ds)
126.0
126
"""
# ENDIMPORT
Expand Down Expand Up @@ -104,6 +104,7 @@ def countPaths(d, debug=False):
return m

if d.openEnd:
return numpy.sum(m[-1,])
r = numpy.sum(m[-1,])
else:
return m[-1, -1]
r = m[-1, -1]
return int(r)
4 changes: 2 additions & 2 deletions dtw/dtw.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,9 @@ def dtw(x, y=None,
>>> plt.plot(da.index1,da.index2,'ro') # doctest: +SKIP
>>> ds.distance
>>> float(ds.distance)
2.0
>>> da.distance
>>> float(da.distance)
2.0
"""
Expand Down

0 comments on commit 179e8e7

Please sign in to comment.