Skip to content

Commit

Permalink
transpose diffrule now in DiffRules
Browse files Browse the repository at this point in the history
  • Loading branch information
jrevels committed Jan 19, 2018
1 parent 3077036 commit 8f9e9b3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Expand Up @@ -2,7 +2,7 @@ julia 0.6.0
Compat 0.45.0
StaticArrays 0.5.0
DiffResults 0.0.1
DiffRules 0.0.1
DiffRules 0.0.3
NaNMath 0.2.2
SpecialFunctions 0.1.0
CommonSubexpressions 0.0.1
4 changes: 0 additions & 4 deletions src/dual.jl
Expand Up @@ -314,10 +314,6 @@ Base.AbstractFloat(d::Dual{T,V,N}) where {T,V,N} = convert(Dual{T,promote_type(V

@inline Base.conj(d::Dual) = d

@inline Base.transpose(d::Dual) = d

@inline Base.ctranspose(d::Dual) = d

@inline Base.abs(d::Dual) = signbit(value(d)) ? -d : d

for (M, f, arity) in DiffRules.diffrules()
Expand Down
3 changes: 0 additions & 3 deletions test/DualTest.jl
Expand Up @@ -384,9 +384,6 @@ for N in (0,3), M in (0,4), V in (Int, Float32)
@test transpose(FDNUM) === FDNUM
@test transpose(NESTED_FDNUM) === NESTED_FDNUM

@test ctranspose(FDNUM) === FDNUM
@test ctranspose(NESTED_FDNUM) === NESTED_FDNUM

@test abs(-FDNUM) === FDNUM
@test abs(FDNUM) === FDNUM
@test abs(-NESTED_FDNUM) === NESTED_FDNUM
Expand Down

0 comments on commit 8f9e9b3

Please sign in to comment.