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

Document `setkey!` in the README

Open mzgubic opened this issue 3 years ago • 0 comments

I love being able to do this but always have to dig a bit to remember how it's called. Possibly on purpose, as it is not exported? Would it be helpful to have it in the docs with a warning?

Not sure what kind of black magic would be needed, but getting a custom error message when trying

julia> ka = AxisKeys.wrapdims(rand(3); obs=1:3);

julia> ka(obs=1) = 1.0
ERROR: cannot define function ka; it already has a value
Stacktrace:
 [1] top-level scope
   @ none:0
 [2] top-level scope
   @ REPL[89]:1

could be helpful for people starting out as well.

mzgubic avatar Jul 18 '22 11:07 mzgubic