e2f9a04f406c8f8d75708669074511479e9cb6a5,t3f/riemannian.py,,already_projected_scalar_products_matrix,#Any#Any#,521

Before Change


  actual_first_ranks = np.array(first_static_ranks.as_list())[1:-1]
  actual_first_ranks = actual_first_ranks[~np.isnan(actual_first_ranks)]
  actual_second_ranks = np.array(second_static_ranks.as_list())[1:-1]
  actual_second_ranks = actual_second_ranks[~np.isnan(actual_second_ranks)]
  if any(actual_first_ranks % 2 != 0) or any(actual_second_ranks % 2 != 0):
    raise ValueError("The TT-ranks of the arguments are not dividable by 2, it "
                     "seems like the arguments are not projections.\n"
                     "Consider using scalar_products_matrix which doesn\" "
                     "assume tangent space structure.")

  ndims = projected_tt_vectors_1.ndims()
  tt_ranks = shapes.lazy_tt_ranks(projected_tt_vectors_1)

  right_size = tt_ranks[1] / 2

After Change


                     "space of the same TT-object. The provided arguments are "
                     "projections on different TT-objects (%s and %s). Or at "
                     "least the pointers are different." %
                     (projected_tt_vectors_1.projection_on,
                      projected_tt_vectors_2.projection_on))

  ndims = projected_tt_vectors_1.ndims()
  tt_ranks = shapes.lazy_tt_ranks(projected_tt_vectors_1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: Bihaqo/t3f
Commit Name: e2f9a04f406c8f8d75708669074511479e9cb6a5
Time: 2017-04-13
Author: novikov@bayesgroup.ru
File Name: t3f/riemannian.py
Class Name:
Method Name: already_projected_scalar_products_matrix


Project Name: huyingxi/Synonyms
Commit Name: ec30739893793a78955764e7978c55e688703d4f
Time: 2018-03-09
Author: hailiang.hl.wang@gmail.com
File Name: synonyms/synonyms.py
Class Name:
Method Name: _similarity_distance


Project Name: vc1492a/PyNomaly
Commit Name: 2526879b1f941c887eeb24a267b5ea010e20d5d7
Time: 2017-12-17
Author: vc1492a@gmail.com
File Name: PyNomaly/loop.py
Class Name: LocalOutlierProbability
Method Name: _ssd