API Reference
as_shape()
Convert a shape representation into a shape defined as a tuple of ints.
x (Union[int, Integral, integer, Iterable[Union[int, Integral, integer]]]) – Shape representation.
ndim (Optional[Integral]) – The required number of dimensions in the shape.
TypeError – If x is not a valid ShapeLike.
x
ShapeLike
TypeError – If x does not feature the required number of dimensions.
Tuple[int, …]