Skip to content

Commit

Permalink
Fix FutureWarning
Browse files Browse the repository at this point in the history
Fix NumPy warnings:

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`.

FutureWarning: Conversion of the second argument of issubdtype from `complex` to `np.complexfloating` is deprecated. In future, it will be treated as `np.complex128 == np.dtype(complex).type`.
  • Loading branch information
carlthome committed Jan 13, 2018
1 parent ed82ba1 commit b80b44b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion librosa/util/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1736,7 +1736,7 @@ def tiny(x):
x = np.asarray(x)

# Only floating types generate a tiny
if np.issubdtype(x.dtype, float) or np.issubdtype(x.dtype, complex):
if np.issubdtype(x.dtype, np.dtype(float).type) or np.issubdtype(x.dtype, np.dtype(complex).type):
dtype = x.dtype
else:
dtype = np.float32
Expand Down

0 comments on commit b80b44b

Please sign in to comment.