code: 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, cmaf 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
docs: Partition work arrays for multithreaded addition and multiplication