Closed JeffFessler closed 1 year ago
I just noticed that the code already is configured to show "just" the first 5 and last 5 maps: https://github.com/JuliaLinearAlgebra/LinearMaps.jl/blob/f8eaf9846f865f74ddb5dda831081f6a6e8db734/src/show.jl#L55 5 is reasonable for simple maps but gets a bit verbose for complicated maps like i have, but it's not worth quibbling about. In general i feel like julia spews too much for 3D and 4D arrays and i can just live with it. So i'll close the issue. Sorry for the extra noise!
In the absence of concrete examples, I took 1:5
. I think it goes back to a proposal #84. It's arbitrary anyway, and we could reduce that to, say, 2. After all, the show
n output is perhaps not the right way to inspect a complicated LinearMap
in the first place.
I'd vote for just first and last, but it's really no big deal either way. The main thing I like to see in a summary is the size and primary type and the eltype.
Here's just part of the
show
output for aLinearMap
I've constructed for a dynamic MRI application here https://juliaimagerecon.github.io/Examples/generated/mri/3-2d-t/ This toy example has just 8 frames; a real-world problem could have 100s of frames, so aBlockDiagonalMap
with 100s of maps. I'd propose that for anyLinearMap
type where there are more than, say, 4 maps combined, we justshow
the first two and last two with⋮
in between (or such). This is a minor and non-urgent issue but I hoped to get your thoughts before submitting a PR.