diff options
author | Yong Tang <yong.tang.github@outlook.com> | 2018-09-09 18:42:36 +0000 |
---|---|---|
committer | Yong Tang <yong.tang.github@outlook.com> | 2018-09-09 18:42:36 +0000 |
commit | 542fb58cf5f66899479602c70659d59897249101 (patch) | |
tree | 1cd8800c0982f1098775b03f28f5b879bbf59bbc /tensorflow/python/framework | |
parent | 31c1d228b15d6bcda2d6bd2172605d3a5f7d2be8 (diff) |
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 <yong.tang.github@outlook.com>
Diffstat (limited to 'tensorflow/python/framework')
-rw-r--r-- | tensorflow/python/framework/test_util.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 " |