parameters: (x, y, name=None)
docstring: Dispatches cwise mul for "Dense*Dense" and "Dense*Sparse".
docstring_summary: Dispatches cwise mul for "Dense*Dense" and "Dense*Sparse".
docstring_tokens: Dispatches cwise mul for Dense * Dense and Dense * Sparse .
function: def _mul_dispatch(x, y, name=None):
    """Dispatches cwise mul for "Dense*Dense" and "Dense*Sparse"."""
    is_tensor_y = isinstance(y, ops.Tensor)
    if is_tensor_y:
      return gen_math_ops.mul(x, y, name=name)
    else:
      assert isinstance(y, ops.SparseTensor)  # Case: Dense * Sparse.
      new_vals = gen_sparse_ops.sparse_dense_cwise_mul(y.indices, y.values,
                                                       y.shape, x, name)
      return ops.SparseTensor(y.indices, new_vals, y.shape)
function_tokens: def _mul_dispatch ( x , y , name = None ) : is_tensor_y = isinstance ( y , ops . Tensor ) if is_tensor_y : return gen_math_ops . mul ( x , y , name = name ) else : assert isinstance ( y , ops . SparseTensor ) # Case: Dense * Sparse. new_vals = gen_sparse_ops . sparse_dense_cwise_mul ( y . indices , y . values , y . shape , x , name ) return ops . SparseTensor ( y . indices , new_vals , y . shape )