We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf66226 commit b4ef240Copy full SHA for b4ef240
src/ArrayInterface.jl
@@ -3,6 +3,15 @@ module ArrayInterface
3
using Requires
4
5
function ismutable end
6
+
7
+"""
8
+ ismutable(x::DataType)
9
10
+Query whether a type is mutable or not, see
11
+https://github.com/JuliaDiffEq/RecursiveArrayTools.jl/issues/19.
12
13
+Base.@pure ismutable(x::DataType) = x.mutable
14
15
ismutable(x::Array) = true
16
17
@@ -16,6 +25,10 @@ function __init__()
25
@require LabelledArrays="2ee39098-c373-598a-b85f-a56591580800" begin
26
ismutable(x::LVector) = ismutable(x.__x)
18
27
end
28
29
+ @require Flux="587475ba-b771-5e3f-ad9e-33799f191a9c" begin
30
+ ismutable(x::Flux.Tracker.TrackedArray) = false
31
+ end
19
32
20
33
21
34
0 commit comments