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 03d351e commit f7c5939Copy full SHA for f7c5939
src/parameters.jl
@@ -3,7 +3,14 @@ struct MTKParameterCtx end
3
4
function isparameter(x)
5
x = unwrap(x)
6
- if istree(x) && operation(x) isa Symbolic
+
7
+ #TODO: Delete this branch
8
+ if x isa Symbolic && Symbolics.getparent(x, false) !== false
9
+ p = Symbolics.getparent(x)
10
+ isparameter(p) ||
11
+ (hasmetadata(p, Symbolics.VariableSource) &&
12
+ getmetadata(p, Symbolics.VariableSource)[1] == :parameters)
13
+ elseif istree(x) && operation(x) isa Symbolic
14
getmetadata(x, MTKParameterCtx, false) ||
15
isparameter(operation(x))
16
elseif istree(x) && operation(x) == (getindex)
0 commit comments