Skip to content

Commit

Permalink
Reduce the reach of type-piracy
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Sep 10, 2023
1 parent fe93cde commit f335f50
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ext/TenetChainRulesCoreExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ function ChainRulesCore.rrule(T::Type{<:Tensor}, data, inds; meta...)
end

# WARN type-piracy
@non_differentiable setdiff(s, itrs...)
@non_differentiable union(s, itrs...)
@non_differentiable intersect(s, itrs...)
@non_differentiable symdiff(s, itrs...)
@non_differentiable setdiff(s::Base.AbstractVecOrTuple{Symbol}, itrs::Base.AbstractVecOrTuple{Symbol}...)
@non_differentiable union(s::Base.AbstractVecOrTuple{Symbol}, itrs::Base.AbstractVecOrTuple{Symbol}...)
@non_differentiable intersect(s::Base.AbstractVecOrTuple{Symbol}, itrs::Base.AbstractVecOrTuple{Symbol}...)
@non_differentiable symdiff(s::Base.AbstractVecOrTuple{Symbol}, itrs::Base.AbstractVecOrTuple{Symbol}...)

end

0 comments on commit f335f50

Please sign in to comment.