commit
72f13834f5
@ -61,6 +61,11 @@ for (M, f, arity) in DiffRules.diffrules()
|
||||
end
|
||||
end
|
||||
|
||||
# Eliminating ambiguity
|
||||
import Base:^
|
||||
|
||||
^(a::TrackedReal, b::Integer) = track(^, a, b)
|
||||
|
||||
# Tuples
|
||||
|
||||
struct TrackedTuple{T<:Tuple}
|
||||
|
@ -75,6 +75,8 @@ end
|
||||
|
||||
@test (param([1,2,3]) .< 2) == [true, false, false]
|
||||
|
||||
@test param(2)^2 == 4.0
|
||||
|
||||
@testset "Intermediates" begin
|
||||
x = param([1])
|
||||
l = sum((x .+ x).^2)
|
||||
|
Loading…
Reference in New Issue
Block a user