Skip to content

Commit 1b14a20

Browse files
committed
layout_replace_in_print for LayoutVector
1 parent efa8ba2 commit 1b14a20

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
88
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
99

1010
[compat]
11-
FillArrays = "0.8.10"
11+
FillArrays = "0.8.11"
1212
julia = "1"
1313

1414
[extras]

src/ArrayLayouts.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ end
222222
layout_replace_in_print_matrix(_, A, i, j, s) =
223223
i in colsupport(A,j) ? s : Base.replace_with_centered_mark(s)
224224

225-
Base.replace_in_print_matrix(A::Union{LayoutMatrix,
225+
Base.replace_in_print_matrix(A::Union{LayoutVector,
226+
LayoutMatrix,
226227
UpperTriangular{<:Any,<:LayoutMatrix},
227228
UnitUpperTriangular{<:Any,<:LayoutMatrix},
228229
LowerTriangular{<:Any,<:LayoutMatrix},

test/runtests.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ MemoryLayout(::Type{MyVector}) = DenseColumnMajor()
3131

3232
@testset "LayoutArray" begin
3333
@testset "LayoutVector" begin
34-
A = MyVector(randn(5))
34+
A = MyVector([1.,2,3])
3535
@test A == A.A == Vector(A)
3636
@test A[1:3] == A.A[1:3]
37+
@test stringmime("text/plain", A) == "3-element MyVector:\n 1.0\n 2.0\n 3.0"
3738
end
3839

3940
@testset "LayoutMatrix" begin

0 commit comments

Comments
 (0)