Skip to content

Commit 86bc9c9

Browse files
committed
remove pointless function
1 parent caa8a32 commit 86bc9c9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/generic.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,8 +1189,6 @@ end
11891189
# would turn into inv(A)^1 = copy(inv(A)), which makes an extra copy.
11901190
@inline Base.literal_pow(::typeof(^), A::AbstractMatrix, ::Val{-1}) = inv(A)
11911191

1192-
_maybecopy(A::AbstractArray{T}, ::Type{T}) where {T} = A
1193-
_maybecopy(A, ::Type{T}) where {T} = copy_oftype(A, T)
11941192
"""
11951193
\\(A, B)
11961194
@@ -1237,9 +1235,9 @@ function (\)(A::AbstractMatrix, B::AbstractVecOrMat)
12371235
if istriu(A)
12381236
return UpperTriangular(A) \ B
12391237
end
1240-
return lu(_maybecopy(A, T)) \ B
1238+
return lu(convert(AbstractArray{T}, A)) \ B
12411239
end
1242-
return qr(_maybecopy(A, T), ColumnNorm()) \ B
1240+
return qr(convert(AbstractArray{T}, A), ColumnNorm()) \ B
12431241
end
12441242

12451243
function (\)(a::AbstractVector, b::AbstractArray)

0 commit comments

Comments
 (0)