From 542fb58cf5f66899479602c70659d59897249101 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Sun, 9 Sep 2018 18:42:36 +0000 Subject: Fix np.float -> np.floating change While running core_rnn_cell_test: ``` bazel test -s --verbose_failures --config=opt //tensorflow/contrib/rnn:core_rnn_cell_test ``` Noticed the following 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`. ``` This fix fixes the above warning. Signed-off-by: Yong Tang --- tensorflow/python/framework/test_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tensorflow/python/framework') diff --git a/tensorflow/python/framework/test_util.py b/tensorflow/python/framework/test_util.py index 4bece9e25e..cd23b3923e 100644 --- a/tensorflow/python/framework/test_util.py +++ b/tensorflow/python/framework/test_util.py @@ -1655,7 +1655,7 @@ class TensorFlowTestCase(googletest.TestCase): if any of the elements do not fall in the specified range. """ target = self._GetNdArray(target) - if not (np.issubdtype(target.dtype, np.float) or + if not (np.issubdtype(target.dtype, np.floating) or np.issubdtype(target.dtype, np.integer)): raise AssertionError( "The value of %s does not have an ordered numeric type, instead it " -- cgit v1.2.3