File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -1224,6 +1224,7 @@ true
12241224function (\ )(A:: AbstractMatrix , B:: AbstractVecOrMat )
12251225 require_one_based_indexing (A, B)
12261226 m, n = size (A)
1227+ T = promote_op (\ , eltype (A), eltype (B))
12271228 if m == n
12281229 if istril (A)
12291230 if istriu (A)
@@ -1235,9 +1236,9 @@ function (\)(A::AbstractMatrix, B::AbstractVecOrMat)
12351236 if istriu (A)
12361237 return UpperTriangular (A) \ B
12371238 end
1238- return lu (A ) \ B
1239+ return _lu ( _lucopy (A, T) ) \ B
12391240 end
1240- return qr (A , ColumnNorm ()) \ B
1241+ return _qr ( copy_similar (A, _qreltype (T)) , ColumnNorm ()) \ B
12411242end
12421243
12431244(\ )(a:: AbstractVector , b:: AbstractArray ) = pinv (a) * b
Original file line number Diff line number Diff line change 954954 @test Int[] ≈ Int[]
955955end
956956
957+ @testset " issue 930" begin
958+ A = rand (Int, 2 , 2 )
959+ B = rand (Int, 2 , 3 )
960+ for M ∈ (A, B), T ∈ (Float32, BigFloat)
961+ v = randn (T, 2 )
962+ x = @inferred M \ v
963+ @test eltype (x) <: T
964+ end
965+ end
966+
957967end # module TestGeneric
You can’t perform that action at this time.
0 commit comments