JuliaDataCubes / JuliaDataCubes/YAXArrays.jl

Insensitive to capital letters and dimension names in general

Open
#335 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
132
Forks
25
PR merge metrics
No merged PRs in 30d

Description

In the following MWE

using YAXArrays
using DimensionalData
using Dates
using Zarr

axlist = (
    Dim{:Ti}(Date("2022-01-01"):Day(1):Date("2022-01-30")),
    Dim{:lon}(range(1, 10, length=10)),
    Dim{:lat}(range(1, 5, length=15)),
    Dim{:Variable}(["var1", "var2"])
    )

data1 = rand(30, 10, 15, 2)
ds1 = YAXArray(axlist, data1)

ds1[Variable = At("var1")]

if you do


ds1[variable = At("var1")]

ds1[var = At("var1")]

ds1[v = At("var1")]

Weirdly, all the previous options return "var1", when the expected behavior is to fail as non "variable", "var", or "v" exist as dimensions. I'm not certain if this is an issue with DimensionalData or YAXArrays.

# Only this one fails
ds1[d = At("var1")]

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 running the Julia MWE in the issue and reproduce the successful lookups for Variable, variable, var, and v, plus the failing d lookup. Trace whether dimension-name matching is handled by YAXArrays or DimensionalData; done means nonexistent dimension names consistently fail while the valid Variable lookup still returns var1.

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.