Python C extension to compute the permanent.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

12 lines
262B

  1. import os
  2. import time
  3. import multiprocessing as mp
  4. import numpy as np
  5. import lib
  6. dimension=8
  7. real=np.random.uniform(0,1,(dimension, dimension))
  8. imag=np.random.uniform(0,1,(dimension, dimension))
  9. submatrix=real+1j*imag
  10. print "OUTPUT: ", lib.permanent(submatrix)