Skip to content

Conversation

@jishnub
Copy link
Member

@jishnub jishnub commented Jun 23, 2023

On master

julia> show(BlockRange((1:3, 1:3)))
BlockRange(1:31:3)

There is a missing comma between the ranges. After this PR,

julia> show(BlockRange((1:3, 1:3)))
BlockRange(1:3, 1:3)

This also changes the "text/plain" display of a BlockRange to make it easier to understand.
On master

julia> BlockRange((1:3, 1:3))
3×3 BlockRange{2, Tuple{UnitRange{Int64}, UnitRange{Int64}}}:
 Block(1, 1)  Block(1, 2)  Block(1, 3)
 Block(2, 1)  Block(2, 2)  Block(2, 3)
 Block(3, 1)  Block(3, 2)  Block(3, 3)

This PR uses forwards it to the default show:

julia> BlockRange((1:3, 1:3))
BlockRange(1:3, 1:3)

This matches the display for CartesianIndices:

julia> CartesianIndices((1:3, 1:3))
CartesianIndices((1:3, 1:3))

@codecov
Copy link

codecov bot commented Jun 23, 2023

Codecov Report

Merging #280 (eea492a) into master (b03703f) will increase coverage by 91.99%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           master     #280       +/-   ##
===========================================
+ Coverage    0.00%   91.99%   +91.99%     
===========================================
  Files          16       16               
  Lines        1462     1474       +12     
===========================================
+ Hits            0     1356     +1356     
+ Misses       1462      118     -1344     
Impacted Files Coverage Δ
src/blockaxis.jl 96.26% <ø> (+96.26%) ⬆️
src/blockindices.jl 83.06% <ø> (+83.06%) ⬆️
src/blocklinalg.jl 94.44% <ø> (+94.44%) ⬆️
src/show.jl 100.00% <100.00%> (+100.00%) ⬆️

... and 12 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jishnub jishnub merged commit 347d5fb into JuliaArrays:master Jun 23, 2023
@jishnub jishnub deleted the blockrangeshow branch June 23, 2023 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant