pylabrobot.utils.list.reshape_2d#

pylabrobot.utils.list.reshape_2d(list_: List[T], shape: Tuple[int, int]) List[List[T]]#

Reshape a list into a 2d list.

Parameters:
  • list – The list to reshape.

  • shape (Tuple[int, int]) – A tuple (rows, columns) specifying the desired shape of the 2D list.

  • list_ (List[T])

Returns:

A 2D list with the specified number of rows and columns.

Raises:

ValueError – If the total number of elements in the list does not match the specified shape (rows * columns).

Return type:

List[List[T]]