AxisIndices.jl icon indicating copy to clipboard operation
AxisIndices.jl copied to clipboard

Re-export dimnames?

Open kescobo opened this issue 4 years ago • 3 comments
trafficstars

I'd like to get the names of dimensions for a NamedAxisArray - googling I found this page on juliahub, but it doesn't seem to be present in v0.7 docs, and dimnames is no longer exported from this package.

Digging through the tests, I figured out I could add NamedDims and then it works. Is this something you'd be willing to import/re-export? Since one can generate NamedAxisArrays from this package, it would be nice to be able to work with them as well without adding an additional direct dependency.

kescobo avatar Dec 23 '20 15:12 kescobo

Seconded. The function dim(arr::NamedAxisArray, name::Symbol)::Integer was also useful.

grahamas avatar Dec 23 '20 17:12 grahamas

it would be nice to be able to work with them as well without adding an additional direct dependency.

I'm going to be moving away from NamedDims.dimnames to ArrayInterface.dimnames soon. In theory if everybody started using ArrayInterface this package would automagically work everywhere.

I do think it's important enough to what this package does that it would make sense to reexport it though. As soon as I catch up on my "real" work for the last week and a half I took off I'll get started on a version using ArrayInterface.dimnames.

Tokazama avatar Jan 04 '21 15:01 Tokazama

Sounds great :+1:

kescobo avatar Jan 04 '21 16:01 kescobo