Skip to content

Commit

Permalink
Revert accidental change to optional take
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed May 12, 2024
1 parent ef1c08d commit 83419bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nx/lib/nx.ex
Expand Up @@ -14132,7 +14132,7 @@ defmodule Nx do
indices = devectorize(indices, keep_names: false)
out = %{tensor | shape: inner_shape, names: inner_names}

Nx.Shared.optional(:take, [tensor, indices, axis], out, fn tensor, indices, axis ->
Nx.Shared.optional(:take, [tensor, indices, [axis: axis]], out, fn tensor, indices, _opts ->
gather_indices = new_axis(indices, rank(indices))
{indices_axes, tensor_axes} = Enum.split(axes(inner_shape), rank(indices))
{leading, trailing} = Enum.split(tensor_axes, axis)
Expand Down

0 comments on commit 83419bb

Please sign in to comment.