Skip to content
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

replace np.float with np.floating to mitigate FutureWarning #19

Merged
merged 1 commit into from
Sep 16, 2018
Merged

replace np.float with np.floating to mitigate FutureWarning #19

merged 1 commit into from
Sep 16, 2018

Conversation

colobas
Copy link
Contributor

@colobas colobas commented Apr 16, 2018

Call to np.issubdtype here, with np.float instead of np.floating raises the following FutureWarning:

FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.


python version: 3.6.4
numpy version: 1.14.2


Example:

Python 3.6.4 (default, Jan  5 2018, 02:35:40) 
[GCC 7.2.1 20171224] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> from scipy.spatial.distance import euclidean
>>> 
>>> from fastdtw import fastdtw
>>> 
>>> x = np.array([[1,1], [2,2], [3,3], [4,4], [5,5]])
>>> y = np.array([[2,2], [3,3], [4,4]])
>>> distance, path = fastdtw(x, y)
__main__:1: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
>>> print(distance)
4.0
>>> 

@slaypni slaypni merged commit 4825483 into slaypni:master Sep 16, 2018
@slaypni
Copy link
Owner

slaypni commented Sep 16, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants