Skip to content

Commit

Permalink
one more println fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaqz committed Apr 1, 2023
1 parent 2874814 commit ba98b75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/Dimensions/primitives.jl
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ any combination of either.
julia> using DimensionalData
julia> A = DimArray(ones(2, 3, 2), (X, Y, Z))
2×3×2 DimArray{Float64,3} with dimensions: X, Y, Z[:, :, 1]
2×3×2 DimArray{Float64,3} with dimensions: X, Y, Z
[:, :, 1]
1.0 1.0 1.0
1.0 1.0 1.0
[and 1 more slices...]
Expand Down Expand Up @@ -346,7 +347,8 @@ A = ones(X(2), Y(4), Z(2))
Dimensions.swapdims(A, (Dim{:a}, Dim{:b}, Dim{:c}))
# output
2×4×2 DimArray{Float64,3} with dimensions: Dim{:a}, Dim{:b}, Dim{:c}[:, :, 1]
2×4×2 DimArray{Float64,3} with dimensions: Dim{:a}, Dim{:b}, Dim{:c}
[:, :, 1]
1.0 1.0 1.0 1.0
1.0 1.0 1.0 1.0
[and 1 more slices...]
Expand Down
3 changes: 2 additions & 1 deletion src/Dimensions/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function Base.show(io::IO, mime::MIME"text/plain", dims::DimTuple)
print(io, ", ")
show(ctx, mime, d)
end
println(io)
return 0
else # Dims get a line each
haskey(io, :inset) && println(io)
Expand All @@ -22,7 +23,7 @@ function Base.show(io::IO, mime::MIME"text/plain", dims::DimTuple)
print(io, inset)
show(ctx, mime, d)
end
print(io, "\n")
println(io)
return lines
end
end
Expand Down

0 comments on commit ba98b75

Please sign in to comment.