davidavdav / NamedArrays.jl

Julia type that implements a drop-in replacement of Array with named dimensions
Other
120 stars 20 forks source link

Subset of NamedArray with duplicates #63

Closed bkamins closed 6 years ago

bkamins commented 6 years ago

Testing the new functionality.

Currently the following fails (it is unrelated to the changes):

julia> x = NamedArray([1 3; 2 4], ( ["a", "b"], ["c", "d"] ), ("Rows", "Cols"))
2×2 Named Array{Int64,2}
Rows ╲ Cols │ c  d
────────────┼─────
a           │ 1  3
b           │ 2  4

julia> x[["a","a"],:]
ERROR: Inconsistent dictionary sizes

and it is understandable why. @davidavdav But would you consider adding a more informative error message (just an idea - this is not crucial).

davidavdav commented 6 years ago

That looks like a bug to mee.

bkamins commented 6 years ago

Thanks!