@@ -17,8 +17,18 @@ struct ParameterIndex{P, B, I}
17
17
validate_size:: Bool
18
18
end
19
19
20
- ParameterIndex (portion, idx, val = false ) = ParameterIndex {typeof(portion), idx[1], typeof(idx)} (portion, idx, val)
21
- ParameterIndex (portion:: Union{SciMLStructures.Tunable, SciMLStructures.Initials} , idx, val = false ) = ParameterIndex {typeof(portion), idx, typeof(idx)} (portion, idx, val)
20
+ function ParameterIndex (portion, idx, val = false )
21
+ ParameterIndex {typeof(portion), idx[1], typeof(idx)} (portion, idx, val)
22
+ end
23
+ function ParameterIndex (portion:: Union{SciMLStructures.Tunable, SciMLStructures.Initials} ,
24
+ idx, val = false )
25
+ ParameterIndex {typeof(portion), idx, typeof(idx)} (portion, idx, val)
26
+ end
27
+ function ParameterIndex (portion:: Union{SciMLStructures.Tunable, SciMLStructures.Initials} ,
28
+ idx:: AbstractArray , val = false )
29
+ idx = Origin (first .(axes (idx)))(SArray {Tuple{size(idx)...}} (idx))
30
+ ParameterIndex {typeof(portion), idx, typeof(idx)} (portion, idx, val)
31
+ end
22
32
ParameterIndex (p:: ParameterIndex ) = ParameterIndex (p. portion, p. idx, false )
23
33
24
34
struct DiscreteIndex
0 commit comments