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

Weird outputs of concatenated arrays #43933

Closed
YichengDWu opened this issue Jan 25, 2022 · 2 comments · Fixed by #43940
Closed

Weird outputs of concatenated arrays #43933

YichengDWu opened this issue Jan 25, 2022 · 2 comments · Fixed by #43940
Labels
arrays [a, r, r, a, y, s] bug Indicates an unexpected problem or unintended behavior

Comments

@YichengDWu
Copy link

Hello,

I'm not sure if it is a bug but how should I understand this?

julia> [[1 1]; 2 ;; 3; [3 4]]
2×3 Matrix{Int64}:
1 3 257641728
2 3 4

julia> versioninfo()
Julia Version 1.7.1
Commit ac5cc99 (2021-12-22 19:35 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
JULIA_EDITOR = code
JULIA_NUM_THREADS =

@YichengDWu YichengDWu changed the title Weird output of concatenated arrays Weird outputs of concatenated arrays Jan 25, 2022
@BioTurboNick
Copy link
Contributor

Yikes! Since I'm mostly responsible for this feature I can look into it.

Definitely a bug.

@oscardssmith oscardssmith added bug Indicates an unexpected problem or unintended behavior arrays [a, r, r, a, y, s] labels Jan 25, 2022
@BioTurboNick
Copy link
Contributor

BioTurboNick commented Jan 25, 2022

This should throw an error. It should be interpreted as equivalent to [[[1 1]; 2] ;; [3 ; [3 4]]]

_typed_hvncat_dims just needs better validation.

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] bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants