JuliaArrays / AxisArrays.jl

Performant arrays where each dimension can have a named axis with values
http://JuliaArrays.github.io/AxisArrays.jl/latest/
Other
200 stars 41 forks source link

How to select a subset of an AxisArray by keyword? #174

Closed Datseris closed 4 years ago

Datseris commented 4 years ago

I have B = AxisArray(randn(10,10), :x, :z);. I want to be able to do something along the lines of

select(B; x = -10 .. 10)

or even using the syntax B[x = -10 .. 10].

  1. Is this possible?
  2. Would you accept it as a PR? I couldn't find something like that in the documentation.