Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Convert VectorOfArray to Array when the size of the last dimension of each Array varies

Open
#208 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reproducing the MWE with VectorOfArray and inspect the conversion entry point in RecursiveArrayTools.jl. The change is done when arrays with equal last dimensions retain current conversion behavior and arrays with varying last dimensions are concatenated along dims = 2, with tests covering both cases.

Written by the indexing model from the issue text.

Description

Hi,

Thanks for the module, very nice. I was wondering if there's a way to convert an object of type VectorOfArray to Array when the size of the last dimension of each Array varies? Please see the MWE below.

v = VectorOfArray([rand(3, 2), rand(3, 2)])
convert(Array, v) # perfect

v = VectorOfArray([rand(3, 2), rand(3, 4)])
convert(Array, v) # want cat(v..., dims = 2)

Thanks in advance for any suggestions.

(If relevant, my need comes from the fact that, in Flux.jl, the last dimension of an Array corresponds to the observation dimension, and I have a variable number of observations in each Array.)

Dominant language
Julia
Stars
233
Forks
76
Avg merge
5h 33m
Merged PRs (30d)
11

Contributor guide

Open the contributing guide

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.

More from SciML/RecursiveArrayTools.jl

All issues in SciML/RecursiveArrayTools.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.