<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def thread_partition_array(x):
    "Partition work arrays for multithreaded addition and multiplication"
    n_threads = get_threadpool_size()
    if len(x.shape) > 1:
        maxind = x.shape[1]
    else:
        maxind = x.shape[0]
    bounds = np.array(np.linspace(0, maxind, n_threads + 1), dtype='int')
    cmin = bounds[:-1]
    cmax = bounds[1:]
    return cmin, cmax