checkSingular static method
Asserts that the layout
has a singular dimension on the axis
.
Implementation
static void checkSingular(Layout layout, int axis, [String? name]) {
if (layout.shape[axis] != 1) {
throw LayoutError.singular(layout, axis, name);
}
}