title: Matrix multiplication in Python, multiprocessing
body: <p>I'm very beginner in Python. 
  I have problem with matrix multiplication. 
  I read matrix from txt file using list of lists (matrices). </p>
  
  <p>When I want to use multiprocessing I have problem with divide list and use new lists in Pool function. </p>
  
  <p>How can I fix this problem?</p>
  
  <p>Please Help</p>
  
  <pre><code>def matrix_multiplication(list1, list2):
      A = numpy.matrix(list1)
      B = numpy.matrix(list2)
      return A*B
  
  def counting(dane):
  
       left_matrix = matrices[0]
  
       for matrix in matrices[1:]:
           left_matrix = numpy.matrix(left_matrix)
           matrix = numpy.matrix(matrix)
           left_matrix = matrix_multiplication(left_matrix, matrix)
  
  
  if __name__ == "__main__":
  
  
      matrices = []
      with open('sample-probka2.txt', 'r') as file:
          matrix_reader = csv.reader(file, delimiter=';')
          current_matrix = []
  
          for row in matrix_reader:
              if len(row) == 0:
                  matrices.append(current_matrix)
                  current_matrix = []
              else:
                  current_matrix.append(list(map(float, row)))
  
      print (matrices)
  
      counting(matrices)
  
  
      np = multiprocessing.cpu_count()
      print('You have', np, 'processors')
  
  
      matrices2 = numpy.array_split(matrices, np)
      print(matrices2)
  
  
      pool = Pool(processes=np)
      count = pool.starmap(liczenie, matrices2)
      print count
  </code></pre>
  
  <p>error from comment, with an attempt to restore formatting:</p>
  
  <pre><code>multiprocessing.pool.RemoteTraceback:  
  Traceback (most recent call last): 
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/pytho‌​n3.6/multiprocessing‌​/pool.py", 
  line 119, in worker result = (True, func(*args, **kwds)) 
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/pytho‌​n3.6/multiprocessing‌​/pool.py", line 47, 
  in starmapstar return list(itertools.starmap(args[0], args[1])) TypeError: counting() takes 1 positional argument but 61 were given
  </code></pre>