aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/linalg/python/ops/linear_operator_util.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/contrib/linalg/python/ops/linear_operator_util.py')
-rw-r--r--tensorflow/contrib/linalg/python/ops/linear_operator_util.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/tensorflow/contrib/linalg/python/ops/linear_operator_util.py b/tensorflow/contrib/linalg/python/ops/linear_operator_util.py
index 06140ef4a2..a2ba8acbd6 100644
--- a/tensorflow/contrib/linalg/python/ops/linear_operator_util.py
+++ b/tensorflow/contrib/linalg/python/ops/linear_operator_util.py
@@ -39,14 +39,8 @@ def assert_no_entries_with_modulus_zero(
with ops.name_scope(name, values=[x]):
x = ops.convert_to_tensor(x, name="x")
dtype = x.dtype.base_dtype
-
- if dtype.is_complex:
- should_be_nonzero = math_ops.complex_abs(x)
- else:
- should_be_nonzero = math_ops.abs(x)
-
+ should_be_nonzero = math_ops.abs(x)
zero = ops.convert_to_tensor(0, dtype=dtype.real_dtype)
-
return check_ops.assert_less(zero, should_be_nonzero, message=message)