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[int, Integral, integer, Iterable[Union[int, Integral, integer]]]) – Shape representation.

Return type

Tuple[int, ...]