Simple Library for splitting an array into given number of chunks. If the input array cannot be divided equally, the final chunk is going to store the remainder.
Install the package using pip pip install git+https://github.com/huntipl/tcc
Run pytest
or python -m pytest
in the repository root folder
import tcc
array = [1, 2, 3, 4, 5]
chunks = 3
result = tcc.split_array(array, chunks)
# result = [[1, 2], [3, 4], [5]]