rafaqz / DimensionalData.jl

Named dimensions and indexing for julia arrays and other data
https://rafaqz.github.io/DimensionalData.jl/stable/
MIT License
262 stars 38 forks source link

Displaying one-dimensional `DimArray` does not quite work in Pluto #725

Open haakon-e opened 3 weeks ago

haakon-e commented 3 weeks ago

If this is issue should be directed to the Pluto repo, please let me know...

Printing DimArrays works nicely in (VSCode) terminal window: image

but in Pluto, it only works for DimArrays with multiple dimensions:

image
versioninfo ```julia julia> versioninfo() Julia Version 1.10.3 Commit 0b4590a5507 (2024-04-30 10:59 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: Linux (x86_64-linux-gnu) CPU: 128 × AMD EPYC 9554 64-Core Processor WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-15.0.7 (ORCJIT, znver3) Threads: 1 default, 0 interactive, 1 GC (on 128 virtual cores) Environment: JULIA_MPI_HAS_CUDA = true JULIA_CPU_TARGET = generic;broadwell;skylake-avx512;icelake-server;cascadelake;znver3 JULIA_CUDA_MEMORY_POOL = none JULIA_LOAD_PATH = :/groups/esm/modules/julia-preferences/_2024_02_20 JULIA_CUDA_USE_BINARYBUILDER = false JULIA_NUM_THREADS = 1 pkg> st [...] [c3e4b0f8] Pluto v0.19.42 [0703355e] DimensionalData v0.27.3 ```
rafaqz commented 3 weeks ago

No idea... @fonsp ?

(Also I guess we can make that output coloured with the new style system?)

asinghvi17 commented 3 weeks ago

Potentially related to https://github.com/JuliaGeo/Shapefile.jl/issues/50

rafaqz commented 2 weeks ago

@haakon-e what happens with a regular Vector ?

haakon-e commented 2 weeks ago

@rafaqz Like this?

image

and, if expanded:

image
haakon-e commented 2 weeks ago

I guess it's maybe similar, in the sense that a (n x 1) matrix will show the way you expect:

image

while a vector (as above) is "compressed" into a horizontal view.

vs terminal: image

rafaqz commented 2 weeks ago

Ok, well that seems to be a Pluto.jl decision. I'm not sure there is much we can do about it. You could make an issue over there and see if they know any solutions?

haakon-e commented 2 weeks ago

Thanks.

It seems others have had similar(?) issues that was worked around for display, e.g. https://github.com/TuringLang/MCMCChains.jl/pull/279 / https://github.com/fonsp/Pluto.jl/issues/868

haakon-e commented 2 weeks ago

Asked question here: https://github.com/fonsp/Pluto.jl/discussions/2936