@tf_export('div_no_nan')
@dispatch.add_dispatch_support
def div_no_nan(x, y, name=None):
    'Computes an unsafe divide which returns 0 if the y is zero.\n\n  Args:\n    x: A `Tensor`. Must be one of the following types: `float32`, `float64`.\n    y: A `Tensor` whose dtype is compatible with `x`.\n    name: A name for the operation (optional).\n  Returns:\n    The element-wise value of the x divided by y.\n  '
    with ops.name_scope(name, 'div_no_nan', [x, y]) as name:
        x = ops.convert_to_tensor(x, name='x')
        y = ops.convert_to_tensor(y, name='y', dtype=x.dtype.base_dtype)
        x_dtype = x.dtype.base_dtype
        y_dtype = y.dtype.base_dtype
        if (x_dtype != y_dtype):
            raise TypeError(('x and y must have the same dtype, got %r != %r' % (x_dtype, y_dtype)))
        return gen_math_ops.div_no_nan(x, y, name=name)
Computes an unsafe divide which returns 0 if the y is zero.

Args:
  x: A `Tensor`. Must be one of the following types: `float32`, `float64`.
  y: A `Tensor` whose dtype is compatible with `x`.
  name: A name for the operation (optional).
Returns:
  The element-wise value of the x divided by y.
@tf_export('div_no_nan')
@dispatch.add_dispatch_support
def div_no_nan(x, y, name=None):
    'Computes an unsafe divide which returns 0 if the y is zero.\n\n  Args:\n    x: A `Tensor`. Must be one of the following types: `float32`, `float64`.\n    y: A `Tensor` whose dtype is compatible with `x`.\n    name: A name for the operation (optional).\n  Returns:\n    The element-wise value of the x divided by y.\n  '
    with ops.name_scope(name, 'div_no_nan', [x, y]) as name:
        x = ops.convert_to_tensor(x, name='x')
        y = ops.convert_to_tensor(y, name='y', dtype=x.dtype.base_dtype)
        x_dtype = x.dtype.base_dtype
        y_dtype = y.dtype.base_dtype
        if (x_dtype != y_dtype):
            raise TypeError(('x and y must have the same dtype, got %r != %r' % (x_dtype, y_dtype)))
        return gen_math_ops.div_no_nan(x, y, name=name)