New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dtwPlotTwoWay function leads to a crash #33
Comments
Please provide the inputs.
Il gio 1 set 2022, 10:31 XueYanYu ***@***.***> ha scritto:
…
- Python port of R's Comprehensive Dynamic Time Warp algorithm package
version: v1.2.0
- Python version: 3.9
- Operating System: Win10
Description
Using the dtwPlotTwoWay functions leads to a crash.
Changing both numpy.nan to 0 in line 166 and 167 in dtwPlot.py seems to
solve the crash.
What I Did
Using the dtwPlotTwoWay functions.
Traceback (most recent call last):
File "C:\Users\name\Desktop\P2\DTWtest.py", line 10, in <module>
dtw(seq1, seq2, keep_internals=True).plot(type="twoway", offset=1)
File "C:\Users\name\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\dtw\dtw.py", line 124, in plot
return dtwPlot(self, type, **kwargs)
File "C:\Users\name\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\dtw\dtwPlot.py", line 70, in dtwPlot
return dtwPlotTwoWay(x, **kwargs)
File "C:\Users\name\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\dtw\dtwPlot.py", line 166, in dtwPlotTwoWay
xts = numpy.pad(xts,(0,maxlen-len(xts)),"constant",constant_values=numpy.nan)
File "<__array_function__ internals>", line 5, in pad
File "C:\Users\name\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\numpy\lib\arraypad.py", line 803, in pad
_set_pad_area(roi, axis, width_pair, value_pair)
File "C:\Users\name\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\numpy\lib\arraypad.py", line 147, in _set_pad_area
padded[left_slice] = value_pair[0]
ValueError: cannot convert float NaN to integer
—
Reply to this email directly, view it on GitHub
<#33>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAU74C3QZ6DBDSL2SSNETOLV4BSU3ANCNFSM6AAAAAAQCDUNWA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I have updated the inputs before the traceback. |
Should be fixed in the next release. Thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Using the dtwPlotTwoWay functions leads to a crash.
Changing both numpy.nan to 0 in line 166 and 167 in dtwPlot.py seems to solve the crash.
What I Did
The text was updated successfully, but these errors were encountered: