mcabbott / mcabbott/AxisKeys.jl

Display formatting error

Open
#98 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
154
Forks
31
PR merge metrics
No merged PRs in 30d

Description

When displaying only three slices, but there are only two slices along the diagonal, a couple newlines are missing:

julia> rand(2,2,2,2,2,2,2) |> wrapdims
7-dimensional KeyedArray(...) with keys:
↓   2-element OneTo{Int}
→   2-element OneTo{Int}
◪   2-element OneTo{Int}
▨   2-element OneTo{Int}
▨   2-element OneTo{Int}
▨   2-element OneTo{Int}
▨   2-element OneTo{Int}
And data, 2×2×2×2×2×2×2 Array{Float64, 7}:
[showing 3 of 32 slices]
[:, :, 1, 1, 1, 1, 1] ~ (:, :, 1, 1, 1, 1, 1):
      (1)         (2)
 (1)    0.143204    0.251809
 (2)    0.432273    0.776817

[:, :, 2, 2, 2, 2, 2] ~ (:, :, 2, 2, 2, 2, 2):
      (1)          (2)
 (1)    0.10484      0.153142                                                     #===================#
 (2)    0.0897166    0.766894[:, :, 2, 2, 2, 2, 2] ~ (:, :, 2, 2, 2, 2, 2): # <---- Here is the problem
      (1)          (2)                                                            #===================#
 (1)    0.10484      0.153142
 (2)    0.0897166    0.766894

julia> julia> using AxisKeys; rand(2,2,2,2,2,3,2) |> wrapdims
7-dimensional KeyedArray(...) with keys:
↓   2-element OneTo{Int}
→   2-element OneTo{Int}
◪   2-element OneTo{Int}
▨   2-element OneTo{Int}
▨   2-element OneTo{Int}
▨   3-element OneTo{Int}
▨   2-element OneTo{Int}
And data, 2×2×2×2×2×3×2 Array{Float64, 7}:
[showing 3 of 48 slices]
[:, :, 1, 1, 1, 1, 1] ~ (:, :, 1, 1, 1, 1, 1):
      (1)         (2)
 (1)    0.142343    0.701584
 (2)    0.653471    0.504314

[:, :, 2, 2, 2, 2, 2] ~ (:, :, 2, 2, 2, 2, 2):
      (1)         (2)
 (1)    0.782924    0.948197
 (2)    0.807271    0.14883

[:, :, 2, 2, 2, 3, 2] ~ (:, :, 2, 2, 2, 3, 2):
      (1)          (2)
 (1)    0.0485772    0.306637
 (2)    0.58494      0.847874```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by reproducing the two Julia examples in the issue and locate the array display-formatting entry point; done means the two-slice diagonal output keeps each slice header and table separated by the missing newlines without regressing the three-slice example.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.