Skip to content

Commit f212f0a

Browse files
authored
Merge pull request #310 from gxyd/bitArray_non_diff
non-differentiability of ops on AbstractArray{Bool}
2 parents f550f8d + 42ae3f2 commit f212f0a

File tree

2 files changed

+65
-2
lines changed

2 files changed

+65
-2
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ChainRules"
22
uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2"
3-
version = "0.7.33"
3+
version = "0.7.34"
44

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

1515
[compat]
16-
ChainRulesCore = "0.9.16"
16+
ChainRulesCore = "0.9.21"
1717
ChainRulesTestUtils = "0.5"
1818
Compat = "3"
1919
FiniteDifferences = "0.11"

src/rulesets/Base/nondiff.jl

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,69 @@
2222
@non_differentiable ==(::Any, ::Any)
2323
@non_differentiable ===(::Any, ::Any)
2424

25+
26+
@non_differentiable Bool(::Any)
27+
28+
@non_differentiable accumulate(::Any, ::AbstractArray{Bool})
29+
@non_differentiable accumulate!(::Any, ::Any, ::AbstractArray{Bool})
30+
@non_differentiable cat(::AbstractArray{Bool}...)
31+
@non_differentiable circcopy!(::Any, ::AbstractArray{Bool})
32+
@non_differentiable circshift(::AbstractArray{Bool}, ::Any)
33+
@non_differentiable circshift!(::Any, ::AbstractArray{Bool}, ::Any)
34+
@non_differentiable circshift!(::AbstractArray{Bool}, ::Any)
35+
@non_differentiable conj(::AbstractArray{Bool})
36+
@non_differentiable conj!(::AbstractArray{Bool})
37+
@non_differentiable cumprod(::AbstractArray{Bool})
38+
@non_differentiable cumprod!(::Any, ::AbstractArray{Bool})
39+
@non_differentiable cumsum(::AbstractArray{Bool})
40+
@non_differentiable cumsum!(::Any, ::AbstractArray{Bool})
41+
@non_differentiable diff(::AbstractArray{Bool})
42+
@non_differentiable dropdims(::AbstractArray{Bool})
43+
@non_differentiable eachcol(::AbstractArray{Bool})
44+
@non_differentiable eachrow(::AbstractArray{Bool})
45+
@non_differentiable eachslice(::AbstractArray{Bool})
46+
@non_differentiable fill(::AbstractArray{Bool})
47+
@non_differentiable fill!(::AbstractArray, ::Any)
48+
@non_differentiable findprev(::AbstractArray{Bool}, ::Any)
49+
@non_differentiable findprev(::Any, ::AbstractArray{Bool}, ::Any)
50+
@non_differentiable getindex(::AbstractArray{Bool}, ::Any...)
51+
@non_differentiable hcat(::AbstractArray{Bool}...)
52+
@non_differentiable hvcat(::Any, ::AbstractArray{Bool}...)
53+
@non_differentiable isperm(::AbstractArray{Bool})
54+
@non_differentiable invperm(::AbstractArray{Bool})
55+
@non_differentiable invpermute!(::Any, ::AbstractArray{Bool})
56+
@non_differentiable mapslices(::Any, ::AbstractArray{Bool})
57+
@non_differentiable Matrix(::AbstractArray{Bool})
58+
@non_differentiable ndims(::AbstractArray{Bool})
59+
@non_differentiable parent(::AbstractArray{Bool})
60+
@non_differentiable parentindices(::AbstractArray{Bool})
61+
@non_differentiable permute!(::AbstractArray{Bool}, ::Any)
62+
@non_differentiable permutedims(::AbstractArray{Bool})
63+
@non_differentiable permutedims(::AbstractArray{Bool}, ::Any)
64+
@non_differentiable promote_shape(::AbstractArray{Bool}, ::Any)
65+
@non_differentiable repeat(::AbstractArray{Bool}, ::Any...)
66+
@non_differentiable reshape(::AbstractArray{Bool}, ::Any...)
67+
@non_differentiable reverse(::AbstractArray{Bool}, ::Any...)
68+
@non_differentiable reverse!(::AbstractArray{Bool}, ::Any...)
69+
@non_differentiable reverseind(::AbstractArray{Bool}, ::Any)
70+
@non_differentiable rot180(::AbstractArray{Bool})
71+
@non_differentiable rot180(::AbstractArray{Bool}, ::Any)
72+
@non_differentiable rotl90(::AbstractArray{Bool})
73+
@non_differentiable rotl90(::AbstractArray{Bool}, ::Any)
74+
@non_differentiable rotr90(::AbstractArray{Bool})
75+
@non_differentiable rotr90(::AbstractArray{Bool}, ::Any)
76+
@non_differentiable selectdim(::AbstractArray{Bool}, ::Any, ::Any)
77+
@non_differentiable setindex!(::AbstractArray{Bool}, ::Any, ::Any)
78+
@non_differentiable similar(::AbstractArray{Bool}, ::Any...)
79+
@non_differentiable stride(::AbstractArray{Bool}, ::Any)
80+
@non_differentiable strides(::AbstractArray{Bool})
81+
@non_differentiable vcat(::AbstractArray{Bool}...)
82+
@non_differentiable vec(::AbstractArray{Bool})
83+
@non_differentiable Vector(::AbstractArray{Bool})
84+
85+
@non_differentiable Array(::AbstractArray{Bool})
86+
@non_differentiable IndexStyle(::AbstractArray{Bool})
87+
2588
@non_differentiable abspath(::AbstractString)
2689
@non_differentiable abspath(::AbstractString, ::AbstractString)
2790
@non_differentiable all(::Any)

0 commit comments

Comments
 (0)