From b9f941a53fa9490fee3306c8f448aeb56bed9ce3 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Sat, 23 May 2020 23:02:55 +0000 Subject: [PATCH] Fix incorrect reference of np.assert_allclose (should be np.testing.assert_allclose) In the docstring of tf.debugging.assert_near, the numpy compatibility part incorrectly uses np.assert_allclose. This should be np.testing.assert_allclose instead. This PR fixes the incorrect docstring. Signed-off-by: Yong Tang --- tensorflow/python/ops/check_ops.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tensorflow/python/ops/check_ops.py b/tensorflow/python/ops/check_ops.py index 3085e05eaf6..bbb7ebdf8be 100644 --- a/tensorflow/python/ops/check_ops.py +++ b/tensorflow/python/ops/check_ops.py @@ -750,9 +750,9 @@ def assert_near_v2(x, y, rtol=None, atol=None, message=None, summarize=None, statically known. @compatibility(numpy) - Similar to `numpy.assert_allclose`, except tolerance depends on data type. - This is due to the fact that `TensorFlow` is often used with `32bit`, `64bit`, - and even `16bit` data. + Similar to `numpy.testing.assert_allclose`, except tolerance depends on data + type. This is due to the fact that `TensorFlow` is often used with `32bit`, + `64bit`, and even `16bit` data. @end_compatibility """ return assert_near(x=x, y=y, rtol=rtol, atol=atol, summarize=summarize, @@ -802,9 +802,9 @@ def assert_near( Op that raises `InvalidArgumentError` if `x` and `y` are not close enough. @compatibility(numpy) - Similar to `numpy.assert_allclose`, except tolerance depends on data type. - This is due to the fact that `TensorFlow` is often used with `32bit`, `64bit`, - and even `16bit` data. + Similar to `numpy.testing.assert_allclose`, except tolerance depends on data + type. This is due to the fact that `TensorFlow` is often used with `32bit`, + `64bit`, and even `16bit` data. @end_compatibility """ message = message or ''