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

Remove trailing comma in 0-dim reshape summary #56853

Merged
merged 2 commits into from
Dec 22, 2024
Merged

Conversation

jishnub
Copy link
Contributor

@jishnub jishnub commented Dec 17, 2024

Currently, there is an extra comma in displaying the summary for a 0-dim ReshapedArray:

julia> reshape(1:1)
0-dimensional reshape(::UnitRange{Int64}, ) with eltype Int64:
1

This PR only prints the comma if dims isn't empty, so that we now obtain

julia> reshape(1:1)
0-dimensional reshape(::UnitRange{Int64}) with eltype Int64:
1

@jishnub jishnub added arrays [a, r, r, a, y, s] display and printing Aesthetics and correctness of printed representations of objects. labels Dec 17, 2024
@jishnub jishnub requested a review from ViralBShah December 20, 2024 04:33
@ViralBShah
Copy link
Member

ViralBShah commented Dec 20, 2024

Looks fine to me. @oscardssmith can you also take a look? Tests are passing, but I wonder if this can affect any packages.

@ViralBShah ViralBShah merged commit 5ee67b8 into master Dec 22, 2024
7 checks passed
@ViralBShah ViralBShah deleted the jishnub/reshapeshow branch December 22, 2024 12:55
@ViralBShah
Copy link
Member

I am merging because it seems like it shouldn't be a problem - but is easy to revert if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrays [a, r, r, a, y, s] display and printing Aesthetics and correctness of printed representations of objects.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants