Skip to content

Commit 08aebd3

Browse files
clean up other dispatches
1 parent 612a3ac commit 08aebd3

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

src/ArrayInterface.jl

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -644,33 +644,20 @@ function qr_instance(jac_prototype::SparseMatrixCSC, pivot = DEFAULT_CHOLESKY_PI
644644
qr(sparse(rand(1,1)))
645645
end
646646

647-
function qr_instance(A::Matrix{T}) where {T}
648-
LinearAlgebra.QRCompactWY(zeros(T,0,0),zeros(T,0,0))
649-
end
650-
651-
function qr_instance(A::Matrix{BigFloat})
652-
LinearAlgebra.QR(zeros(BigFloat,0,0),zeros(BigFloat,0))
653-
end
654-
655-
# Could be optimized but this should work for any real case.
656-
function qr_instance(jac_prototype::SparseMatrixCSC)
657-
qr(sparse(rand(1,1)))
658-
end
659-
660647
"""
661648
qr_instance(a::Number) -> a
662649
663650
Returns the number.
664651
"""
665-
qr_instance(a::Number) = a
652+
qr_instance(a::Number, pivot = DEFAULT_CHOLESKY_PIVOT) = a
666653

667654
"""
668655
qr_instance(a::Any) -> qr(a)
669656
670657
Slow fallback which gets the instance via factorization. Should get
671658
specialized for new matrix types.
672659
"""
673-
qr_instance(a::Any) = qr(a)# check = false)
660+
qr_instance(a::Any, pivot = DEFAULT_CHOLESKY_PIVOT) = qr(a)# check = false)
674661

675662
"""
676663
svd_instance(A) -> qr_factorization_instance

0 commit comments

Comments
 (0)