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

reshape error on Julia master #373

Open
matthias314 opened this issue Aug 16, 2024 · 6 comments
Open

reshape error on Julia master #373

matthias314 opened this issue Aug 16, 2024 · 6 comments

Comments

@matthias314
Copy link

I discovered the following issue with the OffsetArrays tests, see JuliaArrays/OffsetArrays.jl#353. @nsajko suggested that I report it here and mention JuliaLang/julia#54261. The error happens both with FillArrays v1.11.0 and master:

julia> using FillArrays

julia> reshape(Fill(2,6), big(2), :)
ERROR: TypeError: in typeassert, expected Tuple{Vararg{Int64}}, got a value of type Tuple{BigInt}
Stacktrace:
 [1] _reshape_uncolon
   @ ./reshapedarray.jl:135 [inlined]
 [2] reshape(parent::Fill{Int64, 1, Tuple{Base.OneTo{Int64}}}, dims::Tuple{BigInt, Colon})
   @ FillArrays ~/.julia/packages/FillArrays/Zr8Pf/src/FillArrays.jl:269
 [3] reshape(::Fill{Int64, 1, Tuple{Base.OneTo{Int64}}}, ::BigInt, ::Colon)
   @ FillArrays ~/.julia/packages/FillArrays/Zr8Pf/src/FillArrays.jl:265
 [4] top-level scope
   @ REPL[4]:1
Julia Version 1.12.0-DEV.1053
Commit 6916eb74205 (2024-08-15 23:07 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 24 × Intel(R) Xeon(R) CPU E5-2430 0 @ 2.20GHz
  WORD_SIZE: 64
  LLVM: libLLVM-18.1.7 (ORCJIT, sandybridge)
Threads: 1 default, 0 interactive, 1 GC (on 24 virtual cores)
@nsajko
Copy link

nsajko commented Aug 16, 2024

FTR, it's usually better to move an existing issue to the proper repo, than to create a new one. That's what I was asking for. Someone who's a member of JuliaArrays should be able to do that. Not that it matters much now.

@matthias314
Copy link
Author

Sorry, didn't know that!

@jishnub
Copy link
Member

jishnub commented Aug 17, 2024

I think reshape in Base should handle all Integers, and not just Ints. In that case, we won't need to define these specialized methods here at all.

@nsajko
Copy link

nsajko commented Aug 17, 2024

I agree. While looking into fixing this, I stumbled upon many open tickets for reshape on Julia's issue tracker, which seem like they should somewhat be considered together. E.g.:

JuliaLang/julia#17372

JuliaLang/julia#27474

JuliaLang/julia#39123

JuliaLang/julia#39951

JuliaLang/julia#40076

JuliaLang/julia#45589

It's a bit overwhelming TBH.

@dlfivefifty
Copy link
Member

Is this bug also in Julia v1.11-rc?

I think it’s a mistake to try to support master as it’s always too much of a moving target

@nsajko
Copy link

nsajko commented Aug 17, 2024

The bug is that FillArrays relies on internal Julia functionality, _reshape_uncolon from Base, specifically. This is independent of Julia version, clearly.

It only manifests on nightly, though.

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

No branches or pull requests

4 participants