From 23b0022822e259ff7cca93584b23603562cc8229 Mon Sep 17 00:00:00 2001 From: Ibrahim Muhammad Date: Tue, 10 Apr 2018 17:31:50 -0700 Subject: [PATCH] Remove use of deprecated functionality The existing code produced the following warning, this commit removes the warning. ``` 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`. ``` --- src/rasterstats/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rasterstats/main.py b/src/rasterstats/main.py index 710d8f6..5c9eb68 100644 --- a/src/rasterstats/main.py +++ b/src/rasterstats/main.py @@ -162,7 +162,7 @@ def gen_zonal_stats( # add nan mask (if necessary) has_nan = ( - np.issubdtype(fsrc.array.dtype, float) + np.issubdtype(fsrc.array.dtype, np.floating) and np.isnan(fsrc.array.min())) if has_nan: isnodata = (isnodata | np.isnan(fsrc.array))