Skip to content

Commit 3987ef3

Browse files
committed
Fix normal op default constructor
1 parent de33244 commit 3987ef3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/NormalOp.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ end
2222

2323
NormalOp(::Union{Type{T}, Type{Complex{T}}}, parent, weights::AbstractVector{T}) where T = NormalOp(T, parent, WeightingOp(weights))
2424

25-
NormalOp(::Union{Type{T}, Type{Complex{T}}}, parent, weights::AbstractLinearOperator{T}; kwargs...) where T = NormalOpImpl(parent, weights)
25+
NormalOp(::Union{Type{T}, Type{Complex{T}}}, parent, weights; kwargs...) where T = NormalOpImpl(parent, weights)
2626

2727
mutable struct NormalOpImpl{T,S,D,V} <: NormalOp{T, S}
2828
nrow :: Int
@@ -52,6 +52,11 @@ function NormalOpImpl(parent, weights)
5252
tmp = S(undef, size(parent, 1))
5353
return NormalOpImpl(parent, weights, tmp)
5454
end
55+
function NormalOpImpl(parent, weights::Nothing)
56+
S = storage_type(parent)
57+
tmp = S(undef, size(parent, 1))
58+
return NormalOpImpl(parent, weights, tmp)
59+
end
5560

5661
function NormalOpImpl(parent, weights, tmp)
5762
function produ!(y, parent, weights, tmp, x)

0 commit comments

Comments
 (0)