aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/bayesflow/python/kernel_tests/special_math_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/contrib/bayesflow/python/kernel_tests/special_math_test.py')
-rw-r--r--tensorflow/contrib/bayesflow/python/kernel_tests/special_math_test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/contrib/bayesflow/python/kernel_tests/special_math_test.py b/tensorflow/contrib/bayesflow/python/kernel_tests/special_math_test.py
index 615ef798dc..4c9c870894 100644
--- a/tensorflow/contrib/bayesflow/python/kernel_tests/special_math_test.py
+++ b/tensorflow/contrib/bayesflow/python/kernel_tests/special_math_test.py
@@ -211,8 +211,8 @@ class NdtrGradientTest(test.TestCase):
if self._use_log:
g = np.reshape(grad_eval, [-1])
half = np.ceil(len(g) / 2)
- self.assert_all_true(g[:half] > 0.)
- self.assert_all_true(g[half:] >= 0.)
+ self.assert_all_true(g[:int(half)] > 0.)
+ self.assert_all_true(g[int(half):] >= 0.)
else:
# The ndtr gradient will only be non-zero in the range [-14, 14] for
# float32 and [-38, 38] for float64.