Last active
September 29, 2021 14:46
-
-
Save umitkacar/71a9f14b57c1795ddeafe4ed26e1f6c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
x = [6,7,8] | |
y = np.expand_dims(x, axis=0) | |
my = [1,2,3] | |
mx = [4,5,6] | |
yx = np.tensordot(my,mx,0) | |
res = np.where(yx == 1) | |
np.column_stack((res[0], res[1], res[2], res[3])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment