Skip to content

Commit 02f4cb5

Browse files
authored
Fix print on Julia v1.8 (#204)
* Fix print on v1.8 * Tests pass * v0.16.12
1 parent 11d9501 commit 02f4cb5

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ jobs:
1111
matrix:
1212
version:
1313
- '1.6'
14-
- '^1.7.0-0'
14+
- '1'
15+
- '^1.8.0-0'
1516
os:
1617
- ubuntu-latest
1718
- macOS-latest

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name = "BlockArrays"
22
uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
3-
version = "0.16.11"
3+
version = "0.16.12"
44

55
[deps]
66
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
77
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
88
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
99

1010
[compat]
11-
ArrayLayouts = "0.7.2"
12-
FillArrays = "0.11.6, 0.12, 0.13"
11+
ArrayLayouts = "0.8.1"
12+
FillArrays = "0.13.2"
1313
julia = "1.6"
1414

1515
[extras]

src/show.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ axes_print_matrix_row(::Tuple{BlockedUnitRange,AbstractUnitRange}, io, X, A, i,
119119
_blockarray_print_matrix_row(io, X, A, i, cols, sep)
120120

121121
# Need to handled BlockedUnitRange, which is not a LayoutVector
122-
Base.print_matrix_row(io::IO, X::BlockedUnitRange, A::Vector, i::Integer, cols::AbstractVector, sep::AbstractString) =
122+
Base.print_matrix_row(io::IO, X::BlockedUnitRange, A::Vector, i::Integer, cols::AbstractVector, sep::AbstractString, idxlast::Integer=last(axes(X, 2))) =
123123
_blockarray_print_matrix_row(io, X, A, i, cols, sep)
124124

125125
function _show_typeof(io::IO, a::PseudoBlockVector{T,Vector{T},Tuple{DefaultBlockAxis}}) where T

src/views.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ end
180180

181181
unsafe_convert(::Type{Ptr{T}}, V::SubArray{T, N, <:BlockArray, <:NTuple{N, BlockSlice1}}) where {T,N} =
182182
unsafe_convert(Ptr{T}, view(parent(V), block.(parentindices(V))...))
183+
Base.elsize(::Type{<:SubArray{T, N, <:BlockArray{T, N, <:AbstractArray{Block}}, <:NTuple{N, BlockSlice1}}}) where {T,N,Block} =
184+
Base.elsize(Block)
183185

184186

185187
# The default blocksize(V) is slow for views as it calls axes(V), which

0 commit comments

Comments
 (0)