python - All pairs of numbers between 2 arrays -
I'm trying to get all the pairs between two arrays successfully using no numpy what do I really need An external product where the coefficient will be multiplied rather than inserted into an array, i.e.:
a = np.array ([1, 2]) b = np.array ([ 3, 4]) NP. Funk (A, B)> and gt; & Gt; [[[1,3], [1,4]] [[2,3], [2,4]]
I'm trying to np.meshgrid ( A, b)
but I do not expect output.
You also have a mashgrid:
& gt; & Gt; & Gt; Np.transpose (np.meshgrid (a, b)) array ([[[1, 3], [1, 4]], [[2, 3], [2, 4]]])
/>
Comments
Post a Comment