title: xtensor equivalent of numpy a[a>3] = 1
body: <p>Title says it - what is the xtensor equivalent of numpy's</p>
  <pre><code># set all elements &gt; 3 to 1
  sometensor[sometensor &gt; 3] = 1 
  </code></pre>
  <p>?</p>
  <p>It looks like <code>xt::filter</code> works:</p>
  <pre><code>xt::filter(sometensor, sometensor &gt; 3) = 1
  </code></pre>
  <p>But it also looks like the numpy version is much faster. I've build xtensor with xsimd, but it doesn't seem to help in this case. Is there a better, more simd-ish way to do it?</p>
  <p>EDIT</p>
  <p>I found <code>filtration</code>, which indeed is faster (by about 3x), but still slower than numpy (by about 10x)...</p>
  <p>SOLUTION (thx Tom!)</p>
  <pre><code>a = xt::where(a &gt; 0.5, 1.0, a);
  </code></pre>
  <p>Is the fastest of all - about 10x faster than <code>filtration</code>, so it looks like it's simd-d!</p>