JuliaArrays / JuliaArrays/AxisArrays.jl

Uninitialized AxisArray constructor

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

Nobody has claimed this yet.

Dominant language
Julia
Stars
207
Forks
41
PR merge metrics
No merged PRs in 30d

Description

Is there any reason there's currently no constructor to create an uninitialized AxisArray? I.e. something like:

AxisArray{T,N,D}(axes::Axis...)

This seems pretty straightforward, I'm happy to submit a PR - just wanted to check that it wasn't intentionally omitted for some reason.

There's a potential conflict between N and length(axes) - presumably N would be the canonical dimensionality with axes either truncated or extended (with the standard default dimension names and zero-length?) as needed.

Edit: To avoid the over/under-specification, an alternative would be to deviate from the AxisArray type parameter order specification and use AxisArray{T,D} or just AxisArray{T} (where T is a concrete child of AbstractArray). I assume that's frowned upon though - if it's even possible (I'm not clear on how exactly type parametrization works on constructor methods or methods in general, really - any recommended resources for that?).

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 at the AxisArray constructor entry points and type-parameter definition; the issue names no files or tests. Resolve whether dimensionality should follow N or the supplied axes, then add the uninitialized-construction behavior and tests covering the chosen API.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.