JuliaArrays / JuliaArrays/ArrayInterface.jl

Bug in `dense_dims` for reshaped views

Open
#157 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
140
Forks
44
Avg merge
4d 14h
Merged PRs (30d)
5

Description

Reported in https://github.com/JuliaArrays/ArrayInterface.jl/pull/156#issuecomment-851002133:

julia> using ArrayInterface

julia> u_base = randn(10, 10); u_view = view(u_base, 3, :); u_reshaped_view = reshape(u_view, 1, size(u_base, 2));

julia> ArrayInterface.dense_dims(u_reshaped_view)

As confirmed by @chriselrod in https://github.com/JuliaArrays/ArrayInterface.jl/pull/156#issuecomment-851293134, this is a bug:

The correct answer for u_reshaped_view would be (False(),False()).

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

Start by inspecting the dense_dims implementation and the reshaped-view reproduction described in the issue. Run the Julia example with a view and reshape, then verify that dense_dims returns (False(), False()) for the reshaped view.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.