title: Partial update tensor based on boolean mask in TensorFlow
body: <p>I want to update part of the tensor based on some conditions.</p>
  <p>I know that TensorFlow tensors are immutable so creating a new tensor would be ok for me.
  I tried <code>tensor_scatter_nd_update</code> method but I couldn't make it work</p>
  <p>This is code that I want to replicate in TensorFlow written in NumPy.</p>
  <pre class="lang-py prettyprint-override"><code>import numpy as np
  
  a = np.random.random((1, 3))
  b = np.array([[0, 1, 0]])
  
  c = np.zeros_like(a)
  mask = b == 1
  c[mask] = np.log(a[mask])
  </code></pre>