Skip to content

Commit dde9152

Browse files
committed
Document take as optional
1 parent b8f2254 commit dde9152

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nx/lib/nx/backend.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ defmodule Nx.Backend do
158158

159159
@callback all_close(out :: tensor, tensor, tensor, keyword) :: tensor
160160
@callback top_k(out :: tensor, tensor, keyword) :: tensor
161+
@callback take(out :: tensor, input :: tensor, indices :: tensor, keyword) :: tensor
161162

162163
@optional_callbacks [
163164
optional: 3,
@@ -176,7 +177,8 @@ defmodule Nx.Backend do
176177
ifft2: 3,
177178
qr: 3,
178179
cholesky: 2,
179-
eigh: 3
180+
eigh: 3,
181+
take: 4
180182
]
181183

182184
## Inspect implementation

0 commit comments

Comments
 (0)