pub fn select(
layout: &Layout,
selectors: Vec<Selector>,
broadcast: bool,
) -> Result<Plan, Error>Expand description
Selects with one selector for each leading axis of layout, in order, keeping the axes that no selector mentions. A single position removes its axis, and a range keeps it in place. An index array’s axes replace its axis. An unnamed vector keeps the axis’s name and the keys at the positions it selects if none repeats, as a named vector without keys of its own keeps those keys, and an unnamed index array of another rank has plain axes. Index arrays pair, as arguments pair in arithmetic: all of them with broadcast, as .[] reads them, and otherwise those that share an axis name, as ⌷ reads them. Paired index arrays put their axes where the first of them was. A range pairs with an index array that has its axis’s name. Positions that step evenly along each axis read as strides (strided), whether one index array gives them or paired arrays sum to them. One index array whose positions read a stretch of its axis past the ends, as edge modes and positions that count back from the end give them, reads as one padded or rotated entry.