DimensionalData.jl
DimensionalData.jl copied to clipboard
add `name` etc keywords to `DimArray` `similar`
Currently, you can do
a = zeros(X(1:3), Y(1:2), name="hi")
# prints
╭────────────────────────────╮
│ 3×2 DimArray{Float64,2} hi │
├────────────────────────────┴──────────────────── dims ┐
↓ X Sampled{Int64} 1:3 ForwardOrdered Regular Points,
→ Y Sampled{Int64} 1:2 ForwardOrdered Regular Points
└───────────────────────────────────────────────────────┘
↓ → 1 2
1 0.0 0.0
2 0.0 0.0
3 0.0 0.0
but not
similar(a, name="hello")
maybe there's other instances too that I can track down and patch. I'll try and add a PR if this seems reasonable.
Ah maybe similar missed out on keywords back then, most other constructor methods e.g. rand/fill got them.
Feel free to add them.