Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor cleanups in DenseAxisArray #3429

Merged
merged 1 commit into from
Jul 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions src/Containers/DenseAxisArray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
# AbstractArray interface

Base.size(A::DenseAxisArray) = size(A.data)
function Base.LinearIndices(A::DenseAxisArray)
function Base.LinearIndices(::DenseAxisArray)

Check warning on line 304 in src/Containers/DenseAxisArray.jl

View check run for this annotation

Codecov / codecov/patch

src/Containers/DenseAxisArray.jl#L304

Added line #L304 was not covered by tests
return error("DenseAxisArray does not support this operation.")
end
Base.axes(A::DenseAxisArray) = A.axes
Expand Down Expand Up @@ -585,20 +585,18 @@
end
return print(io, "And data, a ", summary(A.data))
end
function _summary(io, A::DenseAxisArray{T,N}) where {T,N}
function _summary(io, ::DenseAxisArray{T,N}) where {T,N}
return println(
io,
"$N-dimensional DenseAxisArray{$T,$N,...} with index sets:",
)
end

if isdefined(Base, :print_array) # 0.7 and later
function Base.print_array(io::IO, X::DenseAxisArray{T,1}) where {T}
return Base.print_matrix(io, X.data)
end
function Base.print_array(io::IO, X::DenseAxisArray{T,2}) where {T}
return Base.print_matrix(io, X.data)
end
function Base.print_array(io::IO, X::DenseAxisArray{T,1}) where {T}
return Base.print_matrix(io, X.data)
end
function Base.print_array(io::IO, X::DenseAxisArray{T,2}) where {T}
return Base.print_matrix(io, X.data)
end

function Base.show_nd(
Expand Down
Loading