Skip to content
Snippets Groups Projects
Commit 2f094252 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

[test_gfk] replace numpy.matlib.repmat with numpy.tile

parent 697ac4e8
No related branches found
No related tags found
No related merge requests found
Pipeline #49185 passed
......@@ -20,11 +20,11 @@ def compute_accuracy(K, Xs, Ys, Xt, Yt):
source = numpy.diag(numpy.dot(numpy.dot(Xs, K), Xs.T))
source = numpy.reshape(source, (Xs.shape[0], 1))
source = numpy.matlib.repmat(source, 1, Yt.shape[0])
source = numpy.tile(source, (1, Yt.shape[0]))
target = numpy.diag(numpy.dot(numpy.dot(Xt, K), Xt.T))
target = numpy.reshape(target, (Xt.shape[0], 1))
target = numpy.matlib.repmat(target, 1, Ys.shape[0]).T
target = numpy.tile(target, (1, Ys.shape[0])).T
dist = source + target - 2 * numpy.dot(numpy.dot(Xs, K), Xt.T)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment