JuliaArrays / JuliaArrays/FillArrays.jl

`reshape` error on Julia master

Open
#373 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
187
Forks
41
Avg merge
17h 29m
Merged PRs (30d)
1

Description

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)

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

Reproduce the failure with reshape(Fill(2, 6), big(2), :) and inspect the reshape methods around src/FillArrays.jl:265-269 alongside Julia's reshapedarray.jl:135 and _reshape_uncolon. Determine the expected handling of BigInt dimensions and verify the corrected behavior against the reported Julia master case.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.