Skip to content

non-differentiability of ops on AbstractArray{Bool} #310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Dec 3, 2020
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ChainRules"
uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2"
version = "0.7.33"
version = "0.7.34"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand All @@ -13,7 +13,7 @@ Requires = "ae029012-a4dd-5104-9daa-d747884805df"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
ChainRulesCore = "0.9.16"
ChainRulesCore = "0.9.21"
ChainRulesTestUtils = "0.5"
Compat = "3"
FiniteDifferences = "0.11"
Expand Down
63 changes: 63 additions & 0 deletions src/rulesets/Base/nondiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,69 @@
@non_differentiable ==(::Any, ::Any)
@non_differentiable ===(::Any, ::Any)


@non_differentiable Bool(::Any)

@non_differentiable accumulate(::Any, ::AbstractArray{Bool})
@non_differentiable accumulate!(::Any, ::Any, ::AbstractArray{Bool})
@non_differentiable cat(::AbstractArray{Bool}...)
@non_differentiable circcopy!(::Any, ::AbstractArray{Bool})
@non_differentiable circshift(::AbstractArray{Bool}, ::Any)
@non_differentiable circshift!(::Any, ::AbstractArray{Bool}, ::Any)
@non_differentiable circshift!(::AbstractArray{Bool}, ::Any)
@non_differentiable conj(::AbstractArray{Bool})
@non_differentiable conj!(::AbstractArray{Bool})
@non_differentiable cumprod(::AbstractArray{Bool})
@non_differentiable cumprod!(::Any, ::AbstractArray{Bool})
@non_differentiable cumsum(::AbstractArray{Bool})
@non_differentiable cumsum!(::Any, ::AbstractArray{Bool})
@non_differentiable diff(::AbstractArray{Bool})
@non_differentiable dropdims(::AbstractArray{Bool})
@non_differentiable eachcol(::AbstractArray{Bool})
@non_differentiable eachrow(::AbstractArray{Bool})
@non_differentiable eachslice(::AbstractArray{Bool})
@non_differentiable fill(::AbstractArray{Bool})
@non_differentiable fill!(::AbstractArray, ::Any)
@non_differentiable findprev(::AbstractArray{Bool}, ::Any)
@non_differentiable findprev(::Any, ::AbstractArray{Bool}, ::Any)
@non_differentiable getindex(::AbstractArray{Bool}, ::Any...)
@non_differentiable hcat(::AbstractArray{Bool}...)
@non_differentiable hvcat(::Any, ::AbstractArray{Bool}...)
@non_differentiable isperm(::AbstractArray{Bool})
@non_differentiable invperm(::AbstractArray{Bool})
@non_differentiable invpermute!(::Any, ::AbstractArray{Bool})
@non_differentiable mapslices(::Any, ::AbstractArray{Bool})
@non_differentiable Matrix(::AbstractArray{Bool})
@non_differentiable ndims(::AbstractArray{Bool})
@non_differentiable parent(::AbstractArray{Bool})
@non_differentiable parentindices(::AbstractArray{Bool})
@non_differentiable permute!(::AbstractArray{Bool}, ::Any)
@non_differentiable permutedims(::AbstractArray{Bool})
@non_differentiable permutedims(::AbstractArray{Bool}, ::Any)
@non_differentiable promote_shape(::AbstractArray{Bool}, ::Any)
@non_differentiable repeat(::AbstractArray{Bool}, ::Any...)
@non_differentiable reshape(::AbstractArray{Bool}, ::Any...)
@non_differentiable reverse(::AbstractArray{Bool}, ::Any...)
@non_differentiable reverse!(::AbstractArray{Bool}, ::Any...)
@non_differentiable reverseind(::AbstractArray{Bool}, ::Any)
@non_differentiable rot180(::AbstractArray{Bool})
@non_differentiable rot180(::AbstractArray{Bool}, ::Any)
@non_differentiable rotl90(::AbstractArray{Bool})
@non_differentiable rotl90(::AbstractArray{Bool}, ::Any)
@non_differentiable rotr90(::AbstractArray{Bool})
@non_differentiable rotr90(::AbstractArray{Bool}, ::Any)
@non_differentiable selectdim(::AbstractArray{Bool}, ::Any, ::Any)
@non_differentiable setindex!(::AbstractArray{Bool}, ::Any, ::Any)
@non_differentiable similar(::AbstractArray{Bool}, ::Any...)
@non_differentiable stride(::AbstractArray{Bool}, ::Any)
@non_differentiable strides(::AbstractArray{Bool})
@non_differentiable vcat(::AbstractArray{Bool}...)
@non_differentiable vec(::AbstractArray{Bool})
@non_differentiable Vector(::AbstractArray{Bool})

@non_differentiable Array(::AbstractArray{Bool})
@non_differentiable IndexStyle(::AbstractArray{Bool})

@non_differentiable abspath(::AbstractString)
@non_differentiable abspath(::AbstractString, ::AbstractString)
@non_differentiable all(::Any)
Expand Down