def shape_facts

bendtorch-core@0.1.0.0 · src/tensor/axis_algebra.bend:3041

import bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend as AxisAlgebra
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/layout.bend as Layout

3041def shape_facts(+shape: Shape.Shape, +axes: List<&2, U32>, accepted: {True{} == Layout.bijective(shape, axes) : Bool}) ->
3042  Facts<Shape.rank_dimensions(Shape.dimensions(shape)), Shape.naturals(axes)>:
3043  match shape:
3044    case Shape.SShape{+dims, +size, +exact, +rank_bound, +capacity_bound}:
3045      facts(Shape.rank_dimensions(dims), Shape.naturals(axes), rank_bound, valid(Shape.SShape{dims, size, exact, rank_bound, capacity_bound}, axes, accepted))

Uses (11)

Used by (11)