spekk.transformations.axis.concretize_axes#
- spekk.transformations.axis.concretize_axes(spec: Spec, args: Mapping[Any, Mapping[Any, Tree] | Sequence[Tree] | Any] | Sequence[Mapping[Any, Tree] | Sequence[Tree] | Any] | Any, kwargs: Mapping[Any, Mapping[Any, Tree] | Sequence[Tree] | Any] | Sequence[Mapping[Any, Tree] | Sequence[Tree] | Any] | Any) Tuple[list, dict][source]#
Convert any instance of
Axisinargsandkwargsto the concrete axis index, as defined by the spec.>>> spec = Spec(["a", "b"]) >>> args = (Axis("a"), Axis("b")) >>> kwargs = {"baz": Axis("b")} >>> concretize_axes(spec, args, kwargs) ((0, 1), {'baz': 1})