Skip to content

Commit

Permalink
Merge pull request #2984 from chifatty/argmax_argmin
Browse files Browse the repository at this point in the history
Fix argmax, argmin example MERGEOK
  • Loading branch information
lesters authored Nov 7, 2023
2 parents a46c443 + 601d26c commit ebcec2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions en/reference/ranking-expressions.html
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ <h3 id="non-primitive-functions">Non-primitive functions</h3>
<tr>
<th>argmax(t, dim)</th>
<td>
<p id="argmax"><code>join(t, max(t, dim), f(x,y)(if (x == y, 1, 0)))</code></p>
<p id="argmax"><code>join(t, reduce(t, max, dim), f(x,y)(if (x == y, 1, 0)))</code></p>
<p>
Returns a tensor with cell(s) of the highest value(s) in the tensor set to 1.
The dimension argument follows the same format as reduce as multiple dimensions can be given and is optional.
Expand All @@ -532,7 +532,7 @@ <h3 id="non-primitive-functions">Non-primitive functions</h3>
<tr>
<th>argmin(t, dim)</th>
<td>
<p id="argmin"><code>join(t, min(t), f(x,y)(if (x &gt;= y, 0, 1)))</code></p>
<p id="argmin"><code>join(t, reduce(t, min, dim), f(x,y)(if (x == y, 1, 0)))</code></p>
<p>
Returns a tensor with cell(s) of the lowest value(s) in the tensor set to 1.
The dimension argument follows the same format as reduce as multiple dimensions can be given and is optional.
Expand Down

0 comments on commit ebcec2d

Please sign in to comment.