Skip to content

Commit e3f31e1

Browse files
author
Michael Abbott
committed
tidy
1 parent 61d4a62 commit e3f31e1

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/rulesets/LinearAlgebra/norm.jl

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
2-
rrule(f::Function, args...; kwargs...) = (@error "no rrule defined!" f args ; nothing)
3-
41
#####
52
##### `norm`
63
#####
@@ -69,11 +66,7 @@ function rrule(::typeof(norm), x::AbstractArray)
6966
norm_pullback_2(::Zero) = (NO_FIELDS, Zero())
7067
return y, norm_pullback_2
7168
end
72-
function rrule(
73-
::typeof(norm),
74-
x::Union{LinearAlgebra.TransposeAbsVec, LinearAlgebra.AdjointAbsVec},
75-
p::Real,
76-
)
69+
function rrule(::typeof(norm), x::Union{LinearAlgebra.AdjOrTransAbsVec}, p::Real)
7770
y, inner_pullback = rrule(norm, parent(x), p)
7871
function norm_pullback(Δy)
7972
(∂self, ∂x′, ∂p) = inner_pullback(Δy)

0 commit comments

Comments
 (0)