Skip to content

Commit 4de0cf2

Browse files
committed
Remove @adjoint rule for sort and filter
1 parent c1d82be commit 4de0cf2

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/lib/array.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -251,20 +251,6 @@ end
251251

252252
@adjoint iterate(r::UnitRange, i...) = iterate(r, i...), _ -> nothing
253253

254-
@adjoint function sort(x::AbstractArray; by=identity)
255-
p = sortperm(x, by=by)
256-
return x[p], x̄ -> (x̄[invperm(p)],)
257-
end
258-
259-
@adjoint function filter(f, x::AbstractVector)
260-
t = map(f, x)
261-
x[t], Δ -> begin
262-
dx = _zero(x, eltype(Δ))
263-
dx[t] .= Δ
264-
(nothing, dx)
265-
end
266-
end
267-
268254
# Iterators
269255

270256
@adjoint function enumerate(xs)

0 commit comments

Comments
 (0)