mindscience.common.to_2tuple

mindscience.common.to_2tuple(t)[source]

Convert an integer or a tuple of integers to a 2-tuple.

Parameters

t (Union[int, tuple(int)]) – The grid height and width.

Returns

Tuple(int, int), same as input or a tuple as (t,t).