Commit 2f094252 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

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

parent 697ac4e8
Pipeline #49185 passed with stages
in 8 minutes and 49 seconds
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment