as_shape

probnum.utils.as_shape(x, ndim=None)[source]

Convert a shape representation into a shape defined as a tuple of ints.

Parameters

x (Union[Integral, Iterable[Integral]]) – Shape representation.

Return type

Tuple[int, …]