Filename: /home/aakarsh/window_size_testing/time_compare3.py

Line #    Mem usage    Increment  Occurrences   Line Contents
=============================================================
   134    202.6 MiB    202.6 MiB           1   @profile
   135                                         def direct(geno_matrix_in):
   136                                             
   137    202.6 MiB      0.0 MiB           1       exact = np.zeros((N, int((M*(M+1))/2)))
   138                                         
   139    202.6 MiB      0.0 MiB           1       start = time.time()
   140                                         
   141    202.6 MiB      0.0 MiB           1       s = 0
   142   2129.1 MiB      0.0 MiB         101       for i in range(M):
   143   2129.1 MiB      0.0 MiB        5050           for j in range(i+1, M):
   144   2129.1 MiB      0.0 MiB        4950               feature = geno_matrix_in[:,i]*geno_matrix_in[:,j]
   145   2129.1 MiB   1926.5 MiB        4950               exact[:,s] = feature
   146   2129.1 MiB      0.0 MiB        4950               s += 1
   147                                         
   148   2223.0 MiB     93.9 MiB           1       exact_svd = np.linalg.svd(exact, full_matrices=False, compute_uv=False)
   149                                         
   150   2223.0 MiB      0.0 MiB           1       end = time.time()
   151   2223.0 MiB      0.0 MiB           1       exact_time = end - start
   152   2223.0 MiB      0.0 MiB           1       return exact_time


