Skip to content

Commit

Permalink
print_matrix_row support for Julia v1.8 (#174)
Browse files Browse the repository at this point in the history
* print_matrix_row support for Julia v1.8

* Update FillArrays.jl
  • Loading branch information
dlfivefifty authored Mar 20, 2022
1 parent 09835a1 commit d04c596
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "FillArrays"
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
version = "0.13.1"
version = "0.13.2"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
14 changes: 10 additions & 4 deletions src/FillArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -639,9 +639,15 @@ Base.replace_in_print_matrix(::Zeros, ::Integer, ::Integer, s::AbstractString) =

# following support blocked fill array printing via
# BlockArrays.jl
axes_print_matrix_row(_, io, X, A, i, cols, sep) =
Base.invoke(Base.print_matrix_row, Tuple{IO,AbstractVecOrMat,Vector,Integer,AbstractVector,AbstractString},
io, X, A, i, cols, sep)
if VERSION < v"1.8-"
axes_print_matrix_row(lay, io, X, A, i, cols, sep) =
Base.invoke(Base.print_matrix_row, Tuple{IO,AbstractVecOrMat,Vector,Integer,AbstractVector,AbstractString},
io, X, A, i, cols, sep)
else
axes_print_matrix_row(lay, io, X, A, i, cols, sep, idxlast::Integer=last(axes(X, 2))) =
Base.invoke(Base.print_matrix_row, Tuple{IO,AbstractVecOrMat,Vector,Integer,AbstractVector,AbstractString,Integer},
io, X, A, i, cols, sep, idxlast)
end

Base.print_matrix_row(io::IO,
X::Union{AbstractFill{<:Any,1},
Expand All @@ -650,7 +656,7 @@ Base.print_matrix_row(io::IO,
RectDiagonal,
AbstractTriangular{<:Any,<:AbstractFill{<:Any,2}}
}, A::Vector,
i::Integer, cols::AbstractVector, sep::AbstractString) =
i::Integer, cols::AbstractVector, sep::AbstractString, idxlast::Integer=last(axes(X, 2))) =
axes_print_matrix_row(axes(X), io, X, A, i, cols, sep)


Expand Down

2 comments on commit d04c596

@dlfivefifty
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/56929

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.13.2 -m "<description of version>" d04c596132e38d41b7e7f60683672238b535257c
git push origin v0.13.2

Please sign in to comment.