title: Python Get Result of Numpy Equal In Same Line
body: <p>I'm sure there is a function for this but I can't find it.</p>
  
  <p>I am doing a calculation like below:</p>
  
  <pre><code># L = large iterator of lots of numpy arrays
  def replace_error_nan(data):
      data[data == ERROR_VALUE] = np.nan
      return data
  L = (replace_error_nan(l) for l in L)
  </code></pre>
  
  <p>I want to perform all of the operations done by replace_error_nan without needing to use the function. I'm sure this is something super simple.</p>
  
  <p>Thanks!</p>
  
  <hr>
  
  <p><strong>Question has been answered by someone who left a "small" comment. I made an answer to myself. Thanks!</strong></p>